TinyMCE hook breaks Wordpress media preview in editor -
I am expanding the WP editor with custom buttons when I use this hook then the problem occurs: / P>
add_filter ('mce_css', 'mytheme_icon_picker');
This is used to encrypt custom scripts and styles. Even the empty function does not display the media player / is not displayed in the editor. This makes me believe that hooking up to mce_css
, WP enqueueing breaks media-player properties.
Does anyone know how to use hooks, can custom behaviors be included correctly without breaking custom files?
The code you are using is a filter, it must return a value.
Your function should be added to the existing list of CSS files.
function wpse_icon_picker ($ mce_css) {If (! Empty ($ mce_css)) {$ mce_css. = ','; } $ Mce_css. = 'Enter URL here in CSS'; Return $ mce_css; } Add_filter ('mce_css', 'wpse_icon_picker');
Comments
Post a Comment