如何从tinymce上下文菜单插件调用thickbox?
如何在tinymce的上下文菜单中添加项目。我需要从tinymce的上下文菜单选择中打开一个thickbox
var url = "upload.php?keepThis=true&TB_iframe=1&width=1000&height=400&model=true";
tb_show("Edit Image", url);
我可以使用上面的代码调用thickbox。我需要在上下文菜单插件中重新编码。帮助我
How to add item in contextmenu of tinymce. I need to open a thickbox from contextmenu selection of tinymce
var url = "upload.php?keepThis=true&TB_iframe=1&width=1000&height=400&model=true";
tb_show("Edit Image", url);
I can call thickbox with above codes. Where i need to recode in contextmenu plugin. Help me
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好的,在这种情况下,您需要加载上下文菜单插件(在加载自定义插件之前执行此操作!)
这是自己的上下文菜单插件的完整示例代码。您需要将此代码放在插件目录的名为“contextmenu”的子目录中名为“editor_plugin.js”的文件(以及名为“editor_plugin_src.js”的文件)中。
确保括号设置正确(我必须复制/粘贴并删除部分代码,因此可能会丢失括号)。
Ok, in that case you need to load the contextmenu plugin (do this before you load your custom plugin!)
Here is the full sample code for an own contextmenu plugin. You need to have this code inside a file called 'editor_plugin.js' (and a file called 'editor_plugin_src.js') in a subdirectory named 'contextmenu' of the plugins directory.
Make sure the brackets are set right (i had to copy/paste and delete parts of the code so there might brackets be missing).