笙默考试管理系统-MyExamTest----codemirror(23)

笙默考试管理系统-MyExamTest----codemirror(23)

目录

笙默考试管理系统-MyExamTest----codemirror(23)

一、 笙默考试管理系统-MyExamTest

二、 笙默考试管理系统-MyExamTest

三、 笙默考试管理系统-MyExamTest

四、 笙默考试管理系统-MyExamTest

五、 笙默考试管理系统-MyExamTest

  • 笙默考试管理系统-MyExamTest

 }

            else if (how == "smart") indentation = mode.indent(state, line.text.slice(curSpaceString.length), line.text);

            else if (how == "add") indentation = curSpace + options.indentUnit;

            else if (how == "subtract") indentation = curSpace - options.indentUnit;

            indentation = Math.max(0, indentation);

            var diff = indentation - curSpace;

            if (!diff) {

                if (sel.from.line != n && sel.to.line != n) return;

                var indentString = curSpaceString;

            }

  • 笙默考试管理系统-MyExamTest

            else {

                var indentString = "", pos = 0;

                if (options.indentWithTabs)

                    for (var i = Math.floor(indentation / options.tabSize); i; --i) {pos += options.tabSize; indentString += "\t";}

                while (pos < indentation) {++pos; indentString += " ";}

            }

            replaceRange(indentString, {line: n, ch: 0}, {line: n, ch: curSpaceString.length});

        }

  • 笙默考试管理系统-MyExamTest

        function loadMode() {

            mode = CodeMirror.getMode(options, options.mode);

            doc.iter(0, doc.size, function(line) { line.stateAfter = null; });

            work = [0];

            startWorker();

        }

        function gutterChanged() {

            var visible = options.gutter || options.lineNumbers;

            gutter.style.display = visible ? "" : "none";

            if (visible) gutterDirty = true;

            else lineDiv.parentNode.style.marginLeft = 0;

        }

  • 笙默考试管理系统-MyExamTest

        function wrappingChanged(from, to) {

            if (options.lineWrapping) {

                wrapper.className += " CodeMirror-wrap";

                var perLine = scroller.clientWidth / charWidth() - 3;

                doc.iter(0, doc.size, function(line) {

                    if (line.hidden) return;

                    var guess = Math.ceil(line.text.length / perLine) || 1;

                    if (guess != 1) updateLineHeight(line, guess);

                });

  • 笙默考试管理系统-MyExamTest

                lineSpace.style.width = code.style.width = "";

            } else {

                wrapper.className = wrapper.className.replace(" CodeMirror-wrap", "");

                maxWidth = null; maxLine = "";

                doc.iter(0, doc.size, function(line) {

                    if (line.height != 1 && !line.hidden) updateLineHeight(line, 1);

                    if (line.text.length > maxLine.length) maxLine = line.text;

                });

            }

你可能感兴趣的:(笙默考试管理系统,javascript,前端,服务器)