Wierd JS error and editor loads in collapsed... also puts in rn after every line break or p tag

Last post 05-02-2011, 9:25 AM by northstjarna. 6 replies.
Sort Posts: Previous Next
  •  03-15-2011, 2:44 AM 66667

    Wierd JS error and editor loads in collapsed... also puts in rn after every line break or p tag

    Hi There,
     
    I have to issues.
    I have an editor on a page which sometimes when you load the page you  get a JS error... Ox25c is null and the editor pane is collapsed.
    The other error I get is that after you press update it inserts the content 'rn' (i guess for carriage return) after every p tag or line break. I think this happens after you go into HTML view and then switch back though.
     
    Is someone able to help me with a solution to this?
     
    Thanks
     
    Andi
  •  03-15-2011, 9:29 PM 66677 in reply to 66667

    Re: Wierd JS error and editor loads in collapsed... also puts in rn after every line break or p tag

    Hi northstjarna,
     
    Can you reproduce this issue on our demo http://phphtmledit.com/EnableAll.php?
     
    Is your site online? If so, can you send me(Kenneth@CuteSoft.net) the test page url and show me the steps to reproduce this issue? I will check it and get back to you  as soon as possible.
     
    Regards,
     
    ken
  •  03-17-2011, 5:54 AM 66712 in reply to 66677

    Re: Wierd JS error and editor loads in collapsed... also puts in rn after every line break or p tag

    Hi there,
     
    Ok. I figured out what the issue was. If you have the Editor in JQuery tabs (because I have more than one, I have three) on screen at the same time I had to make the document.ready function fire after the editors load. So had to do a set timeout. For some reason the JQuery tabs  have a diverse effect on the editor when they are both loading.
     
    So the rule is if you want to use the smart tans, make sure you use a setTimeout() command to load the tabs in after 600ms or so.
     
    The other issue with the rn was because I pasted in HTML in from dreamweaver into HTML view, even though the carriage returns didn't show right then, they were saved when the form was posted. Thus the letters rn went live when after saving. easy enough to remove but this is something you may want to look into.
     
    How do I close this ticket down?
     
    Thanks
     
    Andi
  •  05-02-2011, 6:02 AM 67395 in reply to 66712

    Re: Still puts in rn after every line break or p tag

    Hi There,
     
    If you use  the HTML editor in normal view and then switch to HTML view then back to normal and save or do a vairation of this then the EDITOR puts in an "rn" after every P tag.
     
    Thanks
     
    Andi
  •  05-02-2011, 7:37 AM 67398 in reply to 67395

    Re: Still puts in rn after every line break or p tag

    It's also putting in an RN after update. When I right click and select properties tab, style builder, make font larger or smaller.
    Happening in FireFox.
     
    Does anyone know why this would happen?
  •  05-02-2011, 7:57 AM 67399 in reply to 67398

    Re: Still puts in rn after every line break or p tag

    OK I managed to resolve this now.
    Where before I had the text output from a database I put the content from theabase into a variable and wrapped it in "double quotes"
     
    Like so:
    if($get_page['page_center_content']=="") { $center_content = "

    Type your new content here for CENTER content

    "; } else { $center_content = $get_page['page_center_content']; } //Step 2: Create Editor object. $editorCENTER=new CuteEditor(); $editorCENTER->Text="$center_content";

    NOW without Double quotes works fine.

    if($get_page['page_center_content']=="") { $center_content = "

    Type your new content here for CENTER content

    "; } else { $center_content = $get_page['page_center_content']; } //Step 2: Create Editor object. $editorCENTER=new CuteEditor(); $editorCENTER->Text=$center_content;
  •  05-02-2011, 9:25 AM 67400 in reply to 67399

    Re: Still puts in rn after every line break or p tag

    further to this after posting did not need to escape single quotes '
     
    This was putting in the rn after editing in HTML view and saving...
    $page_center_content = stripslashes(mysql_real_escape_string($_POST['page_center_content']));
    Insead forget the stripslashes and escape string
    $page_center_content = $_POST['page_center_content'];
View as RSS news feed in XML