New answers tagged


There is simple solution for that. You need to check if editor is active then set value of editor otherwise set value of text-area.See bellow code. if(tinyMCE.activeEditor==null) { jQuery("#txtArea").html('your html'); } else{ tinyMCE.get('txtArea').setContent('Your html'); }


So the problem with the values helper was that it will only take array of objects and i was passing a string...I have corrected the code by passing an array of objects..Below is the corrected code.. body: [ { type: 'listbox', name: 'type', label: 'Panel Type', value: type, 'values': ...


If you make a reference to another function in Javascript I don't think you need the () after get_author_list. body: [ { type: 'listbox', name: 'type', label: 'Panel Type', value: type, 'values': get_author_list, tooltip: 'Select the type of panel ...


Please use this code in your functions.php function tinymce_paste_as_text( $init ) { $init['paste_as_text'] = true; return $init; } add_filter('tiny_mce_before_init', 'tinymce_paste_as_text'); For details please follow link : This will paste copied text in plain format


You can pass an array of settings to the editor instance. For possible values please refer to the tinymce documentation, in your case 'init_instance_callback' might be helpful. wp_editor('', 'sedemoeditor', array( 'tinymce' => array( ...


Regardless of what you have configured as valid children, Wordpress handles p tags as well as line breaks in a very unique way. You'll probably notice eventually, if you haven't already, that when switching from the text editor to the visual editor and back that your <p> tags get stripped, similar to what occurs on the frontend. A way to block this ...

Top 50 recent answers are included