我已正确配置MoxieManager与TinyMCE集成,一切正常.但我想从"插入链接"对话框中删除"浏览"按钮(打开MoxieManager对话框).
因此,从下面的截图中,绿色应该保留,但红色应该去.
自我回答,但我想这对其他人也有帮助.
每个TinyMCE插件通常都有一个位于plugins/[plugin_name] /plugin.js(或plugin.min.js)下的JS文件,具体取决于你是否使用了缩小版本.这些插件通常调用editor.windowManager.open()
,传递配置选项的对象以应用于新打开的窗口.
此对象可以具有的值之一是body
要在对话框中显示的项目数组.每个项目都有一些可供选择的选项,包括type
属性.
在下面的示例中,我使用了plugins/link/plugin.js来显示用文件浏览器按钮替换(默认)文本字段所需的差异 - 使用没有浏览按钮的标准文本字段.
win = editor.windowManager.open({
// ...
body: [
{
name: 'href',
type: 'filepicker',
filetype: 'file',
// ...
},
// More code follows here
Run Code Online (Sandbox Code Playgroud)
而新版本:
win = editor.windowManager.open({
// ...
body: [
{
name: 'href',
type: 'textbox',
filetype: 'file',
// ...
},
// More code follows here
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
1830 次 |
最近记录: |