0
我正在使用TinyMCE v4.3.6。由于缺省快捷键“alt gr + f”,我不能在我的编辑器中编写字符“[”。如何禁用快捷键“alt gr + f”?TinyMCE v4.3.6 - 快捷方式
请看看下面我的初始化代码和注释:
tinymce.init({
selector: 'textarea.my-textarea-content',
theme: 'modern',
schema: 'html5-strict',
menubar: false,
// editor size
width : 770,
height : 500,
min_height : 500,
autoresize_min_height: 500,
convert_urls: false,
relative_urls: true,
inline: false,
setup: function(ed) {
ed.on('init', function(event) {
var hidTinyData = $('.my-tinymce-data');
// fullscreen custom shortcut
ed.addShortcut('CTRL+SHIFT+F9', 'Fullscreen', 'mceFullScreen', this);
// trying to override default behaviour for "alt gr + f"
// but it is not working as expected
ed.addShortcut('ctrl+alt+f', '', '', function() {});
ed.addShortcut('meta+alt+f', '', '', function() {});
ed.remove('meta+f');
ed.setContent(hidTinyData.val());
ed.execCommand('mceRepaint');
});
},
plugins: ['advlist autolink lists link charmap hr anchor pagebreak',
'searchreplace wordcount visualblocks visualchars code contextmenu
fullscreen ', 'nonbreaking table textcolor paste autoresize'],
contextmenu: 'inserttable tableprops deletetable cell row column | hr',
toolbar1: 'newdocument | searchreplace | fontselect fontsizeselect
formatselect table | bullist numlist | outdent indent removeformat | fullscreen ',
toolbar2: 'undo redo | bold italic underline strikethrough subscript
superscript | forecolor backcolor | alignleft aligncenter alignright
alignjustify | blockquote hr | visualchars visualblocks | code'
});