WordPress.org

Ready to get started?Download WordPress

Forums

WordPress 2.1 Disappearing Div solution (4 posts)

  1. dwest
    Member
    Posted 7 years ago #

    Tiny MCE as configured in WordPress 2.1 wipes away divs and replaces them with p tags.

    This can be fixed by doing the following:

    1-Open your TinyMCE config file in an editor. The file is located at:
    wp-includes/js/tinymce/plugins/tiny_mce_config.php

    2-Replace Line 25 with the following but on a single line:

    $valid_elements = '#p[*],-div[*],-strong/-b[*],-em/-i[*],-font[*],-ul[*],-ol[*],-li[*],*[*]';

    3-Save the file back to your active WordPress installation, overwriting the existing tiny_mce_config.php file.

    4-In WordPress admin, the editor will now allow divs.

    You may have to refresh your editor page.

    As always, copy your original tiny_mce_config.php file to a safe place for backup before editing the original.

  2. martytdx
    Member
    Posted 6 years ago #

    Thanks for the help - that was getting REALLY annoying. I wonder why they left DIV out of the mix. An oversight?

  3. cenzi
    Member
    Posted 6 years ago #

    This is getting retarded.. I keep losing my breaks too :(

  4. greggo
    Member
    Posted 6 years ago #

    This is getting retarded.. I keep losing my breaks too :(

    I think that may be a safari issue.

Topic Closed

This topic has been closed to new replies.

About this Topic