Add unique class or ID information to tinyMCE

You can filter the TinyMCE body classes to add or change as needed. It’s a string that’s pre-populated with some things like post type, so the easiest thing to do is append your additional classes (with a preceding space). <?php function wpse_128380_tinymce_body_class( $mce ) { // you could do things here to detect whatever you … Read more

How to use the new Dashicons for custom TinyMCE buttons?

Add Dashicon All buttons inside the TinyMCE have a class, also your custom button. Include (use wp_enqueue_style() a stylesheet with styling with Dashicons, like the follow example. .myicon:before { content: ‘\2605’; display: inline-block; -webkit-font-smoothing: antialiased; font: normal 16px/1 ‘dashicons’; vertical-align: top; } On default is the Dashicon active on each edit page, but add the … Read more

Visual Tab Missing From Editor

Just in case anyone else is having this problem, I’ve found that a pretty reliable way to get your visual editor tab back after upgrading to WordPress 4.0 is: disable all plugins Change the theme to one of the defaults (e.g. TwentyFourteen) Go to “my profile” and check the “disable visual editor” box. Save Go … Read more

Markup of oEmbed codes in the editor?

I think this might be a step in the right direction: http://codex.wordpress.org/Plugin_API/Filter_Reference Specifically the the_editor_content filter which is “applied to post content before putting it into a rich editor window.” Sorry I can’t flesh it out more for you but I am just starting to play around with filters myself and have miles to go … Read more

Is it possible to re-use the image details popup?

Let me answer in the most simple way. It depends on the situation and sometimes you might want to create your own MediaFrame, but i think this would be slightly out of the questions scope and would need much more explanation: Assuming all there is is an ID of the attachment to edit, following code … Read more