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

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

目录

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

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

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

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

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

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

// Line objects. These hold state related to a line, including

    // highlighting info (the styles array).

    function Line(text, styles) {

        this.styles = styles || [text, null];

        this.text = text;

        this.height = 1;

        this.marked = this.gutterMarker = this.className = this.handlers = null;

        this.stateAfter = this.parent = this.hidden = null;

}

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

    Line.inheritMarks = function(text, orig) {

        var ln = new Line(text), mk = orig && orig.marked;

        if (mk) {

            for (var i = 0; i < mk.length; ++i) {

                if (mk[i].to == null && mk[i].style) {

                    var newmk = ln.marked || (ln.marked = []), mark = mk[i];

                    var nmark = mark.dup(); newmk.push(nmark); nmark.attach(ln);

                }

            }

        }

        return ln;

}

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

    Line.prototype = {

        // Replace a piece of a line, keeping the styles around it intact.

        replace: function(from, to_, text) {

            var st = [], mk = this.marked, to = to_ == null ? this.text.length : to_;

            copyStyles(0, from, this.styles, st);

            if (text) st.push(text, null);

            copyStyles(to, this.text.length, this.styles, st);

            this.styles = st;

            this.text = this.text.slice(0, from) + text + this.text.slice(to);

            this.stateAfter = null;

            if (mk) {

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

                var diff = text.length - (to - from);

                for (var i = 0, mark = mk[i]; i < mk.length; ++i) {

                    mark.clipTo(from == null, from || 0, to_ == null, to, diff);

                    if (mark.isDead()) {mark.detach(this); mk.splice(i--, 1);}

                }

            }

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

        },    };

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

N201871643

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值