Support » Plugins » Hacks » WordPress 3.3 breaks wp_tiny_mce(()

  • Resolved twick

    (@twick)


    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"
    	    )
    	);
Viewing 12 replies - 1 through 12 (of 12 total)
  • 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

    @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?

    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

    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.)

    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

    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.

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

    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);
    }

    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));

    @twick Many thanks!!!

    Many thanks the new wp_editor worked like charm … 😀

    esan

    (@esan)

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

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘WordPress 3.3 breaks wp_tiny_mce(()’ is closed to new replies.