How to add custom CSS (theme option) to TinyMCE?

Solution 1 This works as javascript solution: Example: tinyMCE.activeEditor.dom.addStyle(‘p {color:red; font-size:28px;}’); just open your js console and paste it for a quick test. To target a specific editor one should use: tinyMCE.getInstanceById(‘##editorID##’).dom.addStyle(‘p {color:red; font-size:28px;}’); This will inject the provided string into the editors iframe <head><style id=”mceDefaultStyles”></style> … Solution 2 Use wp_ajax as callback handler to … Read more

Creating a wp_editor instance with custom tinyMCE buttons

You pretty much had it, according to the description. Here’s what you might be looking for for instances 2 and 3 (for instance 1 you can leave the settings empty to get the default set of buttons): Instance 2: wp_editor( $distribution, ‘distribution’, array( ‘media_buttons’ => false, ‘textarea_rows’ => 8, ‘tabindex’ => 4, ‘tinymce’ => array( … Read more