这个插件为 TinyMCE 增加保存按钮。按钮会提交编辑器所在的表单。
安装说明
- 在 TinyMCE 插件选项列表中加入插件,例如: plugins : "save"。
- 在按钮列表中加入 save 按钮名,例如:theme_advanced_buttons3_add : "save"。
选项
| [save_enablewhendirty] | 如果这个选项被设为 true , 编辑按钮保持灰色不可用状态知道内容发生修改。默认为 false。 |
| [onchange_callback] | 这个选项可以在 save 按钮被按下时,调用一个你的自定义函数。默认不可用。 |
初始化示例
tinyMCE.init({
theme : "advanced",
mode : "textareas",
plugins : "save",
theme_advanced_buttons3_add : "save",
save_enablewhendirty : true,
onchange_callback : "mysave"
});