MCPcopy Index your code
hub / github.com/DHTMLX/gantt / copyableRanges

Function copyableRanges

samples/common/codehighlight/codemirror.js:8186–8195  ·  view source on GitHub ↗
(cm)

Source from the content-addressed store, hash-verified

8184 }
8185
8186 function copyableRanges(cm) {
8187 var text = [], ranges = [];
8188 for (var i = 0; i < cm.doc.sel.ranges.length; i++) {
8189 var line = cm.doc.sel.ranges[i].head.line;
8190 var lineRange = {anchor: Pos(line, 0), head: Pos(line + 1, 0)};
8191 ranges.push(lineRange);
8192 text.push(cm.getRange(lineRange.anchor, lineRange.head));
8193 }
8194 return {text: text, ranges: ranges}
8195 }
8196
8197 function disableBrowserMagic(field, spellcheck, autocorrect, autocapitalize) {
8198 field.setAttribute("autocorrect", autocorrect ? "" : "off");

Callers 2

onCopyCutFunction · 0.85
prepareCopyCutFunction · 0.85

Calls 1

PosFunction · 0.85

Tested by

no test coverage detected