WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] WordPress 3.3 breaks wp_tiny_mce(() (13 posts)

  1. twick
    Member
    Posted 2 years ago #

    I updated to 3.3 now this no longer works. I can resize the window and whatever but there is no tool bar anymore. It was working before I updated.

    wp_tiny_mce( false ,
    	    array(
    	        "editor_selector" => "content"
    	    )
    	);
  2. Rev. Voodoo
    Volunteer Moderator
    Posted 2 years ago #

    http://wpdevel.wordpress.com/2011/12/07/whats-new-javascript-in-3-3/

    Hopefully this can get you started, the tiny MCE API has totally changed

  3. twick
    Member
    Posted 2 years ago #

    @rev
    Thanks! I am using wp_editor instead and it works great. I appreciate the link. Lots of good info there.

    While we are on the topic, is there an easy way to stop the editor from stripping the paragraph tags?

  4. Rev. Voodoo
    Volunteer Moderator
    Posted 2 years ago #

    http://codex.wordpress.org/Function_Reference/wp_editor
    Did ya check out this new codex page?

    looks like there is an wpautop you can use as an arg

  5. twick
    Member
    Posted 2 years ago #

    Yeah, I tried that. Didnt work. I'll look at the arguments

    <?=wp_editor( @$_POST['content'], "content", array("wpautop"=> false))?> (also tried putting "false" in quotes.)

  6. Rev. Voodoo
    Volunteer Moderator
    Posted 2 years ago #

    Yeah, I haven't played around at all with the API yet, just knew of the changes. I can't do much more than guess at this point

  7. twick
    Member
    Posted 2 years ago #

    Never mind... I just did a /facepalm.
    Just realized I was in HTML mode when adding text... so "wpautop"=> false works like a charm.

    I appreciate the assist.

  8. Rev. Voodoo
    Volunteer Moderator
    Posted 2 years ago #

    lol! Cool, thanks for reporting back so I at least know what works!!

  9. jbmw
    Member
    Posted 2 years ago #

    Any idea how can I select different buttons with wp_editor()?
    I need only to have these buttons:
    bold,italic,underline,bullist,numlist,undo,redo

    I was able to do with the following code... Not anymore!

    if (function_exists('wp_tiny_mce')) {

    add_filter('teeny_mce_before_init', create_function('$a', '
    $a["theme"] = "advanced";
    $a["skin"] = "wp_theme";
    $a["height"] = "200";
    $a["width"] = "800";
    $a["onpageload"] = "";
    $a["mode"] = "exact";
    $a["elements"] = "mytextarea,mytextarea2";
    $a["editor_selector"] = "mceEditor";
    $a["plugins"] = "safari,inlinepopups,spellchecker";
    $a["theme_advanced_buttons1"] = "bold,italic,underline,separator,bullist,numlist,separator,undo,redo";

    $a["forced_root_block"] = false;
    $a["force_br_newlines"] = true;
    $a["force_p_newlines"] = false;
    $a["convert_newlines_to_brs"] = true;

    return $a;'));

    wp_tiny_mce(true);
    }

  10. twick
    Member
    Posted 2 years ago #

    jbmw look at the "tinymce" setting http://codex.wordpress.org/Function_Reference/wp_editor

    Looks like you can pass setting directly to tinymce.

    So it would be something like

    <?php
    $tinymcesetting = array("theme_advanced_buttons1" => "bold,italic,underline,separator,bullist,numlist,separator,undo,redo");
    
    wp_editor( $content, $editor_id, array("tinymce" => $tinymcesettings));
    
    ?>

    Actually... scratch all that just do this with the code you already have;

    wp_editor( $content, $editor_id, array("tinymce" => $a));

  11. jbmw
    Member
    Posted 2 years ago #

    @twick Many thanks!!!

  12. ketanmujumdar
    Member
    Posted 2 years ago #

    Many thanks the new wp_editor worked like charm ... :D

  13. esan
    Member
    Posted 1 year ago #

    [sorry i want ask for something but i found : http://wordpress.org/extend/plugins/rich-category-editor/ ]

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags