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

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

目录

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

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

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

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

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

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

// CodeMirror version 2.2

//

// All functions that need access to the editor's state live inside

// the CodeMirror function. Below that, at the bottom of the file,

// some utilities are defined.

// CodeMirror is the only global var we claim

var CodeMirror = (function() {

    // This is the function that produces an editor instance. It's

    // closure is used to store the editor state.

function CodeMirror(place, givenOptions) {

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

        // Determine effective options based on given values and defaults.

        var options = {}, defaults = CodeMirror.defaults;

        for (var opt in defaults)

            if (defaults.hasOwnProperty(opt))

                options[opt] = (givenOptions && givenOptions.hasOwnProperty(opt) ? givenOptions : defaults)[opt];

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

        var targetDocument = options["document"];

        // The element in which the editor lives.

        var wrapper = targetDocument.createElement("div");

        wrapper.className = "CodeMirror" + (options.lineWrapping ? " CodeMirror-wrap" : "");

        // This mess creates the base DOM structure for the editor.

        wrapper.innerHTML =

            '<div style="overflow: hidden; position: relative; width: 3px; height: 0px;">' + // Wraps and hides input textarea

  •                 '<textarea style="position: absolute; padding: 0; width: 1px;" wrap="off" ' +笙默考试管理系统-MyExamTest----codemirror

                'autocorrect="off" autocapitalize="off"></textarea></div>' +

                '<div class="CodeMirror-scroll" tabindex="-1">' +

                '<div style="position: relative">' + // Set to the height of the text, causes scrolling

                '<div style="position: relative">' + // Moved around its parent to cover visible view

                '<div class="CodeMirror-gutter"><div class="CodeMirror-gutter-text"></div></div>' +

                // Provides positioning relative to (visible) text origin

                '<div class="CodeMirror-lines"><div style="position: relative">' +

                '<div style="position: absolute; width: 100%; height: 0; overflow: hidden; visibility: hidden"></div>' +

                '<pre class="CodeMirror-cursor"> </pre>' + // Absolutely positioned blinky cursor

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

                '<div></div>' + // This DIV contains the actual code

                '</div></div></div></div></div>';

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

N201871643

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

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

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

打赏作者

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

抵扣说明:

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

余额充值