How to use a TinyMCE filter?
How to use a TinyMCE filter?
How to use a TinyMCE filter?
How to remove “justifyfull” in TinyMCE
Try adding an id attribute in your button definition: ed.addButton(‘solution’, { disabled: 0,//count_problems(ed).length == 0, id: ‘my_button’, title : ‘Add problem solution’, //cmd: ‘solution_fun’, image : url + ‘/images/wspringer.png’, type: ‘menubutton’, menu: [{text: ‘problem id = ‘ + 1, value: 1}], onselect: function(v1) { ed.windowManager.open({ title: ‘Insert solution in popeye output format’, body: [{type: ‘textbox’, … Read more
Turns out I wasn’t far from the answer: function mce_mod( $init ) { $init[‘apply_source_formatting’] = false; return $init; } add_filter(‘tiny_mce_before_init’, ‘mce_mod’, 99); add this to functions.php and it will stop the nbsp’s. From the TinyMCE docs if you want to fully tame tinyMCE I recommend you check out this gist
get_option() is undefined in TinymceWindowManager
How to have html in TinyMce “Text” tab properly indented and highlighted
What you can do is use the get_current_screen() function to get what screen the current user is on ( in the admin panel ) and only add those global values whenever the user is viewing the post page: function my_format_TinyMCE( $in ) { $screen = get_current_screen(); if( is_object( $screen ) && ‘post’ == $screen->post_type ) … Read more
There are a number of problems: The tiny_mce_before_init filter does not affect the TinyMCE editor that VC instantiates for parameters with name == ‘content’ and type == ‘content_html’. VC gets the TinyMCE HTML markup in a separate AJAX request. The editor’s instantiation does not benefit from the tinyMCEPreInit inline JavaScript array that the filter affects. … Read more
Changed get_stylesheet_directory_uri() to get_stylesheet_directory(), and it works.
By default TinyMCE, the (visual) editor of WordPress, strips schema microdata from input. There are plugins (example) that will prevent this behaviour. Or you can do it yourself by adding this snippet to your functions.php (docs): function wpse238918_allow_schema ($in) { if(!empty($in[‘extended_valid_elements’])) $in[‘extended_valid_elements’] .= ‘,’; $in[‘extended_valid_elements’] .= ‘@[id|class|style|title|itemscope|itemtype|itemprop|datetime|rel],div,dl,ul,dt,dd,li,span,a|rev|charset|href|lang|tabindex|accesskey|type|name|href|target|title|class|onfocus|onblur]’; return $in; } add_filter(‘tiny_mce_before_init’, ‘wpse238918_allow_schema’ );