Add Button to TinyMCE Custom Menu

That looks like it is an error due to TinyMCE (editorremov I believe) not being loaded yet. Either hook to the admin_footer action instead of admin_head (interestingly you have declared the in_footer option as true and it is still not working) or declare the editorremov dependency when enqueuing your script: wp_enqueue_script( ‘features’, plugin_dir_url( __FILE__ ) … Read more

DOM reference to TinyMCE editor element (button)

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

TinyMCE adds a   after a HR

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

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)