code: function () {
          const editor = this.editor
          const $textElem = editor.$textElem
  
          $textElem.on('keydown', e => {
              if (e.keyCode !== 9) {
                  return
              }
              if (!editor.cmd.queryCommandSupported('insertHTML')) {
                  // 必须原生支持 insertHTML 命令
                  return
              }
              const $selectionElem = editor.selection.getSelectionContainerElem()
              if (!$selectionElem) {
                  return
              }
              const $parentElem = $selectionElem.parent()
              const selectionNodeName = $selectionElem.getNodeName()
              const parentNodeName = $parentElem.getNodeName()
  
              if (selectionNodeName === 'CODE' && parentNodeName === 'PRE') {
                  // <pre><code> 里面
                  editor.cmd.do('insertHTML', '    ')
              } else {
                  // 普通文字
                  editor.cmd.do('insertHTML', '&nbsp;&nbsp;&nbsp;&nbsp;')
              }
  
              e.preventDefault()
          })
  
      }
docs: tab 特殊处理