diff --git a/packages/tinymce-plugins/codeblock/index.js b/packages/tinymce-plugins/codeblock/index.js index d8f4c99cf..c3c1ff613 100644 --- a/packages/tinymce-plugins/codeblock/index.js +++ b/packages/tinymce-plugins/codeblock/index.js @@ -171,12 +171,7 @@ var registerHandlers = function (api, editor) { moveCaretTo(node, characterRange.start, endIndex); } else { // TODO: handle line deindent - node.textContent = insertAt(text, TAB, characterRange.start); - moveCaretTo( - node, - characterRange.start + TAB.length, - characterRange.end + TAB.length - ); + editor.insertContent(TAB); } } else { editor.insertContent(TAB);