我正在使用TinyMCE和jQuery发表评论。当我发表评论时,我想重置TinyMCE,重置TinyMCE取消按钮等等。
tinyMCE.init({
menubar: false,
plugins: [
'fullscreen code paste table contextmenu advlist autolink lists link'
]
,language: 'zh_CN'
,toolbar: 'undo redo | insert | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | fullscreen code'
,selector:'#comment'
,paste_merge_formats: true
,paste_word_valid_elements: "b,strong,i,em,h1,h2"
,setup: function(editor) {
editor.on('keydown change', function() {
comment = editor.getContent();
});
}
});
tinyMCE.editors[0].setContent(""); //can make tinyMCE comment empty
但我想要tinyMCE取消按钮灰色
答案 0 :(得分:1)
您是否要重置undo
按钮(不确定cancel
按钮的含义)?如果是这样,你就这样做了:
tinyMCE.editors[0].undoManager.clear();