e);

            if (findDepth(curLineHTML, cc) !== 0) {
                // Cursor is inside a <tag>, don't set cursor:
                curLineHTML = curLineHTML.replace(cc, '');
                doc.replaceRange(curLineHTML, CodeMirror.Pos(pos.line, 0), CodeMirror.Pos(pos.line));
            }

            // Submit HTML to TinyMCE:
            // [FIX] Cursor position inside JS, style or &nbps;
            // Workaround to fix cursor position if inside script tag
            var code = codemirror.getValue(