Tab 上的 Tinymce 按 make:同一行中的符号

Tinymce on tab press make : symbol in same line

我正在使用 tinymce 编辑器,我想要的是当用户按下 tab 按钮之前: symbol 它应该是字符串对齐。供参考,请查看屏幕截图。

tinyMCE.init({
    selector: 'textarea',
    indentation : '60pt',
    plugins: 'textcolor print preview importcss searchreplace autolink autosave save directionality visualblocks visualchars fullscreen image link media template codesample table charmap hr pagebreak nonbreaking anchor toc insertdatetime advlist lists wordcount imagetools textpattern noneditable',
    paste_as_text:true,
    //menubar: false,
    toolbar: 'bold italic underline strikethrough superscript subscript | fontselect fontsizeselect | alignleft aligncenter alignright alignjustify | outdent indent |  numlist bullist checklist | forecolor backcolor',
    nonbreaking_force_tab: true

});

可以听Tab键加4个空格。检查 fiddle 以获取工作示例。 Documentation

tinymce.init({
  selector: '#mytextarea',
  init_instance_callback: function(editor) {
    editor.on('keydown', function(e) {
        if(e.keyCode == 9){
          e.preventDefault();
          tinymce.activeEditor.execCommand('mceInsertContent', false, "    ");
        }
    });
  }
});