Is there open “Insert/Edit image” dialog event in Tinymce?

点点圈 提交于 2019-12-02 07:58:15

TinyMCE does not currently fire an event when opening the image dialog. If you wanted to make it do so you can modify the image plugin to include the command when the menu option or toolbar button is triggered. For example you can do this for the menu option:

editor.addMenuItem('image', {
  icon: 'image',
  text: 'Image',
  onclick: Dialog(editor).open,
  context: 'insert',
  cmd: 'mceImage',
  prependToContext: true
}); 

Note the cmd option added to that list. Its not there in the editor code as delivered but you can add it yourself and get that command to be triggered. You can do the same for toolbar buttons by adding the cmd option as well.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!