WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Live editor not adding or (6 posts)

  1. marscosta
    Member
    Posted 1 year ago #

    Hi all,

    Running latest WP version (3.5.1), when I create a new page/post and write text (visual editor), paragraphs are not correctly handled. What I mean is, I write:

    line1

    line2
    line3

    and the resulting code should either be

    line 1

    line 2
    line3

    or

    <p>line 1</p>
    <p></p>
    <p></p>
    <p></p>
    <p>line 2</p>
    <p>line3</p>

    but in reality what WP produces is:

    line1

     

    line2
    line3

    What am I missing ?

    Thanks.

  2. esmi
    Forum Moderator
    Posted 1 year ago #

    Have you tried:

    - deactivating all plugins to see if this resolves the problem. If this works, re-activate the plugins one by one until you find the problematic plugin(s).

    - switching to the default theme to rule out any theme-specific problems.

    - resetting the plugins folder by FTP or PhpMyAdmin. Sometimes, an apparently inactive plugin can still cause problems.

  3. marscosta
    Member
    Posted 1 year ago #

    My first post doesn't make any sense, because I can't seem to post either < br > or & nbsp; as it's stripped, but I'll try your suggestions and report back. Thanks.

  4. marscosta
    Member
    Posted 1 year ago #

    All 3 points done, but problem persists:

    • deactivated all through admin interface, problem remained
    • switched to Twenty Eleven, problem remained
    • reset through FTP to plugins folder, problem remained

    All plugins I have (2) are custom made and don't interfere with the live editor (don't even use it), and I can't see how the theme can interfere with the WYSIWYG editor.

    Previous installations of WP worked correctly, but this one doesn't seem to add the necessary HTML tags for new lines/paragraphs from inputed text.

    More clearly stated problem: I input in visual editor

    line1
    (blank line)
    line2

    and HTML output is:

    line1
    (blank line)
    & n b s p ;
    (blank line)
    line2

    Therefore the displayed text on frontend is

    line1 line2

    Added spaces in & nbsp ; so this forum doesn't trip it and (blank line) means exactly that.

    Any other thoughts ?

  5. esmi
    Forum Moderator
    Posted 1 year ago #

    switched to Twenty Eleven, problem remained

    Try the default 2012 theme.

    All plugins I have (2) are custom made and don't interfere with the live editor (don't even use it), and I can't see how the theme can interfere with the WYSIWYG editor.

    Any plugin or theme can cause all kinds of problems right across the wp-admin area - including affecting editors. Can you replicate the problem using the default 2012 theme with all plugins deactivated?

  6. marscosta
    Member
    Posted 1 year ago #

    Thank you, solved the problem.

    I figured WP would show me the HTML code on admin in the Text tab, and as I wasn't seeing correct tags I figured that was the problem. What I was missing was a

    echo apply_filters('the_content', $page_data->post_content);

    instead of just

    echo $page_data->post_content;

    which would make sense if I was already seeing final HTML code in the Text tab of Live editor.

    Thanks for your help !

Topic Closed

This topic has been closed to new replies.

About this Topic