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
Thread Starter
twick
(@twick)
@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.ww.wp.xz.cn/Function_Reference/wp_editor
Did ya check out this new codex page?
looks like there is an wpautop you can use as an arg
Thread Starter
twick
(@twick)
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
Thread Starter
twick
(@twick)
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);
}
Thread Starter
twick
(@twick)
jbmw look at the “tinymce” setting http://codex.ww.wp.xz.cn/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));
Many thanks the new wp_editor worked like charm … 😀