WordPress.org

Ready to get started?Download WordPress

Forums

tinymce setup issue in plugin (3 posts)

  1. zuotian
    Member
    Posted 2 years ago #

    Hi,

    In my plugin I try to add a rich text field on user profile page. I followed the example of the post and added following lines for profile.php.

    <?php wp_editor($profileuser->author_bio, 'author_bio', array('dfw' => true, 'media_buttons' => false) ); ?>

    TinyMCE loaded correctly. However, once I added formatting to the content, ex, <strong>test</strong>, then save, the content in the visual editor starts to show html tags.

    I suspect that the editor didn't initialize to visual mode, but not sure how to confirm it.

    Are there any other setups I need to do to initialize TinyMCE?

    Thanks.

  2. maxemil
    Member
    Posted 2 years ago #

    make sure you use the nightly build:
    http://wordpress.org/nightly-builds/wordpress-latest.zip

    and follow the ticket, its being updated almost daily:
    http://core.trac.wordpress.org/ticket/17144

    maby download the example plugin:
    http://core.trac.wordpress.org/attachment/ticket/17144/test-wp-editor-class.2.zip

    Im implementing it in a plugin, and it seems to work as expected :)

  3. zuotian
    Member
    Posted 2 years ago #

    Thanks for the links.

    I found out the issue is caused by entity encoded $profileuser->author_bio. I added the decoding function, updated to the latest wordpress version, and everything works fine now.

Topic Closed

This topic has been closed to new replies.

About this Topic