我正在尝试为我的tinyMCE编辑器实现一个额外的按钮。作为示例,我采用了 localhost:61025/Web/Scripts/tinymce/themes/advanced/source_editor.htm 的源,这是 html(source) 按钮的引用。
如何创建一个引用我自己的文件的按钮,例如:
<input type=button value=html onclick="open_source_html()">
并且 open_source_html() 应该打开我的tinymcepopup: 本地主机:61025/Web/Scripts/tinymce/themes/advanced/source_editor_CUSTOM.htm 文件
请帮助我。
最佳答案
Alons 链接是一个很好的链接。您还可以看看tinymce插件目录中的一些插件。
tinyMCE.init({
mode : "textareas",
theme : "advanced",
...
setup : function(ed) {
// Add a custom button
ed.addButton('yourbutton', {
title : 'Your button',
image : 'img/example.gif', // path to your image
onclick : function() {
// Add you own code to execute something on click
open_source_html();
}
});
}
)};
关于jquery - tinyMCE 模态弹出窗口原样用于其他用途,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14615230/