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


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

    目录

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

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

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

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

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

    • 笙默考试管理系统-MyExamTest

     },

            backUp: function(n) {this.pos -= n;},

            column: function() {return countColumn(this.string, this.start, this.tabSize);},

            indentation: function() {return countColumn(this.string, null, this.tabSize);},

            match: function(pattern, consume, caseInsensitive) {

                if (typeof pattern == "string") {

                    function cased(str) {return caseInsensitive ? str.toLowerCase() : str;}

                    if (cased(this.string).indexOf(cased(pattern), this.pos) == this.pos) {

                        if (consume !== false) this.pos += pattern.length;

                        return true;

                    }

                }

    • 笙默考试管理系统-MyExamTest

                else {

                    var match = this.string.slice(this.pos).match(pattern);

                    if (match && consume !== false) this.pos += match[0].length;

                    return match;

                }

            },

            current: function(){return this.string.slice(this.start, this.pos);}

        };

        CodeMirror.StringStream = StringStream;

    • 笙默考试管理系统-MyExamTest

        function MarkedText(from, to, className, set) {

            this.from = from; this.to = to; this.style = className; this.set = set;

        }

        MarkedText.prototype = {

            attach: function(line) { this.set.push(line); },

            detach: function(line) {

                var ix = indexOf(this.set, line);

                if (ix > -1) this.set.splice(ix, 1);

            },

    • 笙默考试管理系统-MyExamTest

            split: function(pos, lenBefore) {

                if (this.to <= pos && this.to != null) return null;

                var from = this.from < pos || this.from == null ? null : this.from - pos + lenBefore;

                var to = this.to == null ? null : this.to - pos + lenBefore;

                return new MarkedText(from, to, this.style, this.set);

            },

    • 笙默考试管理系统-MyExamTest

            dup: function() { return new MarkedText(null, null, this.style, this.set); },

            clipTo: function(fromOpen, from, toOpen, to, diff) {

                if (this.from != null && this.from >= from)

                    this.from = Math.max(to, this.from) + diff;

                if (this.to != null && this.to > from)

                    this.to = to < this.to ? this.to + diff : from;

                if (fromOpen && to > this.from && (to < this.to || this.to == null))

                    this.from = null;

                if (toOpen && (from < this.to || this.to == null) && (from > this.from || this.from == null))

                    this.to = null;

  • 相关阅读:
    深入理解.Net中的线程同步之构造模式(二)内核模式1.内核模式构造物Event事件
    qt-C++笔记之清空QVBoxLayout中的QCheckBox
    3.Gin 框架中的路由简要说明
    鼠标操作和响应
    【Lua基础 第3章】变量、赋值语句、索引、lua中的循环、循环控制语句
    【分布式服务架构】常用的RPC框架
    生活中的省电小窍门
    cesium 实战记录(三)获取鼠标位置总结
    使用LangChain与chatGPT API开发故事推理游戏-海龟汤
    1.1小程序内置tabbar和自定义tabbar区别
  • 原文地址:https://blog.csdn.net/N201871643/article/details/133880668