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

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

目录

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

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

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

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

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

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

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

function onDoubleClick(e) {

            for (var n = e_target(e); n != wrapper; n = n.parentNode)

                if (n.parentNode == gutterText) return e_preventDefault(e);

            var start = posFromMouse(e);

            if (!start) return;

            lastDoubleClick = {time: +new Date, pos: start};

            e_preventDefault(e);

            selectWordAt(start);

        }

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

        function onDrop(e) {

            e.preventDefault();

            var pos = posFromMouse(e, true), files = e.dataTransfer.files;

            if (!pos || options.readOnly) return;

            if (files && files.length && window.FileReader && window.File) {

                function loadFile(file, i) {

                    var reader = new FileReader;

                    reader.onload = function() {

                        text[i] = reader.result;

                        if (++read == n) {

                            pos = clipPos(pos);

                            operation(function() {

                                var end = replaceRange(text.join(""), pos, pos);

                                setSelectionUser(pos, end);

                            })();

                        }

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

                    };

                    reader.readAsText(file);

                }

                var n = files.length, text = Array(n), read = 0;

                for (var i = 0; i < n; ++i) loadFile(files[i], i);

            }

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

            else {

                try {

                    var text = e.dataTransfer.getData("Text");

                    if (text) {

                        var end = replaceRange(text, pos, pos);

                        var curFrom = sel.from, curTo = sel.to;

                        setSelectionUser(pos, end);

                        if (draggingText) replaceRange("", curFrom, curTo);

                        focusInput();

                    }

                }

                catch(e){}

            }

        }

        function onDragStart(e) {

            var txt = getSelection();

            // This will reset escapeElement

            htmlEscape(txt);

            e.dataTransfer.setDragImage(escapeElement, 0, 0);

            e.dataTransfer.setData("Text", txt);

        }

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

        function handleKeyBinding(e) {

            var name = keyNames[e.keyCode], next = keyMap[options.keyMap].auto, bound, dropShift;

            if (name == null || e.altGraphKey) {

                if (next) options.keyMap = next;

                return null;

你可能感兴趣的:(笙默考试管理系统,java)