Reset Undo on the tinymce editor

The global variable tinyMCE has an array of editors. So you have to call the undoManager inside them. Like this for default wp editor on post edit/create screen: tinyMCE.editors[0].undoManager.clear(); If you want to do it in a specific editor, select the editor id in n like this: var n = 0; // editor id tinyMCE.editors[n].undoManager.clear();

Uncaught ReferenceError:switchEditors is not defined

it might me entirely different solution that i am providing but it solved the problem for me. I followed these steps: Open the user that is getting error. (WordPress admin menu > users > your profile) Changed the setting of “Disable the visual editor when writing” and saved the settings Again disabled this feature and … Read more

Is there a way to add another row to the tinyMCE kitchen sink toggle?

Yes! Use the mce_buttons_2 filter to add buttons to the second row. Use the mce_buttons_3 filter to add buttons to the third row. Here’s an example of what I use: function mytheme_mce_buttons_row_3($buttons) { $buttons[] = ‘fontselect’; $buttons[] = ‘fontsizeselect’; $buttons[] = ‘code’; $buttons[] = ‘sup’; $buttons[] = ‘sub’; $buttons[] = ‘backcolor’; $buttons[] = ‘separator’; $buttons[] … Read more