tinymce添加自定义快捷键,ctrl+s保存
添加
tinymce
定义
快捷
ctrl+s
保存
回调
editor
function
编程技术
发布日期
2022-12-10
更新日期
2022-12-10
阅读次数 119
文章字数 928
tinymce在初始化完成时,可添加回调函数,在回调里添加多个自定义快捷键函数
tinymce.init({
selector: '#articleContent',
language: 'zh_CN',
plugins: 'print preview searchreplace autolink directionality visualblocks visualchars fullscreen image link media template advcode codesample table charmap hr pagebreak nonbreaking anchor insertdatetime advlist lists wordcount imagetools textpattern help emoticons autosave bdmap indent2em autoresize formatpainter axupimgs importword kityformula-editor',
toolbar: 'removeformat forecolor backcolor bold underline | alignleft aligncenter alignright charmap kityformula-editor |
bullist numlist | subscript superscript image |
table media hr pagebreak insertdatetime indent2em lineheight | code-sample formatselect code preview',
min_height: 600,
autosave_ask_before_unload: false,
automatic_uploads: false,
images_upload_base_path: '/demo',
images_upload_handler: function (blobInfo, succFun, failFun) {
succFun('/demo/images/img.jpg');
},
mobile: {
menubar: true
},
init_instance_callback: function (editor) {
editor.shortcuts.add("ctrl+s", "save", function() { //可多个初始化回调
vm.submit();
})
}
});
文章作者: 朱丰华
文章链接: https://smart.52dixiaowo.com/blog/post-234.html
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。
添加
tinymce
定义
快捷
ctrl+s
保存
回调
editor
function
发表评论
相关推荐