I have created a plugin that adds a new button to the TinyMCE editor in the admin edit pages/posts area. I am trying to apply a font icon to it as per the the other buttons in Wordpress 3.8. I have created a CSS file will the following:
All I need to do is load the CSS when the editor is loaded... Seemed easy.
add_editor_style() but apparently it is only for theme development not plugins
I found the
mce_css filter but it didn't work. I think it is for only applying CSS to the content in the editor... Not the buttons.
I read the source code for the
class-wp-editor.php the files responsible for generating the editor on the admin edit pages/posts. There is a setting within the
_WP_Editors object that looked promising:
'editor_css' => '', // intended for extra styles for both visual and Text editors buttons, needs to include the <style> tags, can use "scoped".
However I couldn't find a way to hook into it.
Any help would be appreciated.