How not to load css theme when creating TinyMCE plugin?

I am creating my first TinyMCE plugin. I included 'tiny_mce_popup.js' in html and loaded 'advanced / skins / default / dialog.css' by default.

I do not need TinyMCE to download this css and the only solution I have found so far is described here http://www.mattephraim.com/blog/tag/tinymce/ ; and, as the author suggests, this is not the most elegant solution. Please help if you know how to handle this properly.

+3
source share
1 answer

I found the official documentation digging 1 mm into the code 'tiny_mce_popup.js'. Basically all you have to do is init () from editor_plugin.js, add popup_css as an option and set it to false:

ed.windowManager.open({
  ...
  file : url + '/dialog.htm',
  width : 640 + parseInt(ed.getLang('attachment_fu.delta_width', 0)),
  height : 485 + parseInt(ed.getLang('attachment_fu.delta_height', 0)),
  popup_css : false,
  ...
})
+2
source

Source: https://habr.com/ru/post/1702834/


All Articles