first commit
This commit is contained in:
144
wp-content/plugins/wp-smart-editor/js/codemirror/addon/adv-dialog/advanced-dialog.js
vendored
Normal file
144
wp-content/plugins/wp-smart-editor/js/codemirror/addon/adv-dialog/advanced-dialog.js
vendored
Normal file
@@ -0,0 +1,144 @@
|
||||
"use strict";
|
||||
|
||||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
||||
|
||||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: http://codemirror.net/LICENSE
|
||||
// Advanced dialog plugin written by Jamie Morris
|
||||
// Open advanced dialogs on top of an editor. Relies on dialog.css.
|
||||
|
||||
(function (mod) {
|
||||
if ((typeof exports === "undefined" ? "undefined" : _typeof(exports)) == "object" && (typeof module === "undefined" ? "undefined" : _typeof(module)) == "object") // CommonJS
|
||||
mod(require("codemirror"));else if (typeof define == "function" && define.amd) // AMD
|
||||
define(["codemirror"], mod);else // Plain browser env
|
||||
mod(CodeMirror);
|
||||
})(function (CodeMirror) {
|
||||
var createPanel = function createPanel(cm, template, bottom) {
|
||||
var el = document.createElement("div");
|
||||
el.className = 'CodeMirror-advanced-dialog';
|
||||
|
||||
if (typeof template == "string") {
|
||||
el.innerHTML = template;
|
||||
} else {
|
||||
// Assuming it's a detached DOM element.
|
||||
el.appendChild(template);
|
||||
}
|
||||
var panel = cm.addPanel(el, {
|
||||
position: bottom ? "bottom" : "top"
|
||||
});
|
||||
return panel;
|
||||
};
|
||||
|
||||
var closePanel = function closePanel(cm) {
|
||||
var state = cm.state.advancedDialog;
|
||||
if (!state || !state.current) {
|
||||
return;
|
||||
}
|
||||
|
||||
state.current.panel.clear();
|
||||
|
||||
if (state.current.onClose) state.current.onClose(state.current.panel.node);
|
||||
delete state.current;
|
||||
cm.focus();
|
||||
};
|
||||
|
||||
CodeMirror.defineExtension("openAdvancedDialog", function (template, options) {
|
||||
var _this = this;
|
||||
|
||||
if (!this.addPanel) {
|
||||
throw "CodeMirror-AdvancedDialog requires the panel addon to be included in the page. This can usually be found in the addons folder of the default CodeMirror installation, and must be included BEFORE the AdvancedDialog addon.";
|
||||
}
|
||||
if (!options) options = {};
|
||||
if (!this.state.advancedDialog) this.state.advancedDialog = {};
|
||||
|
||||
if (this.state.advancedDialog.current) {
|
||||
closePanel(this);
|
||||
}
|
||||
|
||||
var panel = createPanel(this, template, options.bottom);
|
||||
this.state.advancedDialog.current = {
|
||||
panel: panel,
|
||||
onClose: options.onClose
|
||||
};
|
||||
|
||||
var inputs = panel.node.getElementsByTagName("input");
|
||||
var buttons = panel.node.getElementsByTagName("button");
|
||||
if (inputs && inputs.length > 0 && options.inputBehaviours) {
|
||||
var _loop = function _loop(i) {
|
||||
var behaviour = options.inputBehaviours[i];
|
||||
var input = inputs[i];
|
||||
if (behaviour.value) {
|
||||
input.value = behaviour.value;
|
||||
}
|
||||
|
||||
if (!!behaviour.focus) {
|
||||
input.focus();
|
||||
}
|
||||
|
||||
if (!!behaviour.selectValueOnOpen) {
|
||||
input.select();
|
||||
}
|
||||
|
||||
if (behaviour.onInput) {
|
||||
CodeMirror.on(input, "input", function (e) {
|
||||
behaviour.onInput(inputs, e);
|
||||
});
|
||||
}
|
||||
|
||||
if (behaviour.onKeyUp) {
|
||||
CodeMirror.on(input, "keyup", function (e) {
|
||||
behaviour.onKeyUp(inputs, e);
|
||||
});
|
||||
}
|
||||
|
||||
CodeMirror.on(input, "keydown", function (e) {
|
||||
if (behaviour.onKeyDown && behaviour.onKeyDown(inputs, e)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (e.keyCode === 27 || !!behaviour.closeOnEnter && e.keyCode === 13) {
|
||||
input.blur();
|
||||
CodeMirror.e_stop(e);
|
||||
closePanel(_this);
|
||||
} else if (e.keyCode === 13 && behaviour.callback) {
|
||||
CodeMirror.e_stop(e);
|
||||
behaviour.callback(inputs, e);
|
||||
}
|
||||
});
|
||||
|
||||
if (behaviour.closeOnBlur !== false) CodeMirror.on(input, "blur", function () {
|
||||
closePanel(_this);
|
||||
});
|
||||
};
|
||||
|
||||
for (var i = 0; i < options.inputBehaviours.length; i++) {
|
||||
_loop(i);
|
||||
}
|
||||
}
|
||||
|
||||
if (buttons && buttons.length > 0 && options.buttonBehaviours) {
|
||||
var _loop2 = function _loop2(i) {
|
||||
var behaviour = options.buttonBehaviours[i];
|
||||
if (!!behaviour.callback) {
|
||||
CodeMirror.on(buttons[i], "click", function (e) {
|
||||
CodeMirror.e_stop(e);
|
||||
behaviour.callback(inputs, e);
|
||||
});
|
||||
} else {
|
||||
CodeMirror.on(buttons[i], "click", function () {
|
||||
closePanel(_this);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
for (var i = 0; i < options.buttonBehaviours.length; i++) {
|
||||
_loop2(i);
|
||||
}
|
||||
}
|
||||
return function () {
|
||||
closePanel(_this);
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
//# sourceMappingURL=advanced-dialog.js.map
|
||||
66
wp-content/plugins/wp-smart-editor/js/codemirror/addon/adv-dialog/dialog.css
vendored
Normal file
66
wp-content/plugins/wp-smart-editor/js/codemirror/addon/adv-dialog/dialog.css
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
.CodeMirror-advanced-dialog {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
background: white;
|
||||
padding: 10px;
|
||||
overflow: hidden;
|
||||
color: inherit;
|
||||
border: 1px solid #eee;
|
||||
box-shadow: 1px 1px 12px #ccc;
|
||||
-moz-box-shadow: 1px 1px 12px #ccc;
|
||||
-webkit-box-shadow: 1px 1px 12px #ccc;
|
||||
position: relative;
|
||||
z-index: 1100;
|
||||
}
|
||||
|
||||
.CodeMirror-advanced-dialog input {
|
||||
border: none;
|
||||
outline: none;
|
||||
background: transparent;
|
||||
width: 20em;
|
||||
color: inherit;
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
.CodeMirror-advanced-dialog button {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.CodeMirror-advanced-dialog .row {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.CodeMirror-advanced-dialog label {
|
||||
flex: 0 0 100px;
|
||||
}
|
||||
|
||||
.CodeMirror-advanced-dialog input[type="text"] {
|
||||
display: inline-block;
|
||||
border: 1px solid #eee;
|
||||
margin: 10px;
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
|
||||
.CodeMirror-search-hint {
|
||||
display: block;
|
||||
font-style: italic;
|
||||
flex: 0 0 100%;
|
||||
}
|
||||
|
||||
.CodeMirror-search-count {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
}
|
||||
|
||||
.buttons button {
|
||||
margin: 0 5px;
|
||||
padding: 5px;
|
||||
border: none;
|
||||
}
|
||||
.buttons button:hover {
|
||||
cursor: pointer;
|
||||
background: #ccc;
|
||||
}
|
||||
349
wp-content/plugins/wp-smart-editor/js/codemirror/addon/adv-dialog/revised-search.js
vendored
Normal file
349
wp-content/plugins/wp-smart-editor/js/codemirror/addon/adv-dialog/revised-search.js
vendored
Normal file
@@ -0,0 +1,349 @@
|
||||
"use strict";
|
||||
|
||||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
||||
|
||||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: http://codemirror.net/LICENSE
|
||||
|
||||
// Revised search plugin written by Jamie Morris
|
||||
// Define search commands. Depends on advanceddialog.js
|
||||
(function (mod) {
|
||||
if ((typeof exports === "undefined" ? "undefined" : _typeof(exports)) == "object" && (typeof module === "undefined" ? "undefined" : _typeof(module)) == "object") // CommonJS
|
||||
mod(require("codemirror"), require("codemirror-advanceddialog"));else if (typeof define == "function" && define.amd) // AMD
|
||||
define(["codemirror", "codemirror-advanceddialog"], mod);else // Plain browser env
|
||||
mod(CodeMirror);
|
||||
})(function (CodeMirror) {
|
||||
"use strict";
|
||||
|
||||
var replaceDialog = "\n <div class=\"row find\">\n <label for=\"CodeMirror-find-field\">Replace:</label>\n <input id=\"CodeMirror-find-field\" type=\"text\" class=\"CodeMirror-search-field\" placeholder=\"Find\" />\n <span class=\"CodeMirror-search-hint\">(Use /re/ syntax for regexp search)</span>\n <span class=\"CodeMirror-search-count\"></span>\n </div>\n <div class=\"row replace\">\n <label for=\"CodeMirror-replace-field\">With:</label>\n <input id=\"CodeMirror-replace-field\" type=\"text\" class=\"CodeMirror-search-field\" placeholder=\"Replace\" />\n </div>\n <div class=\"buttons\">\n <button>Find Previous</button>\n <button>Find Next</button>\n <button>Replace</button>\n <button>Replace All</button>\n <button>Close</button>\n </div>\n ";
|
||||
|
||||
var findDialog = "\n <div class=\"row find\">\n <label for=\"CodeMirror-find-field\">Find:</label>\n <input id=\"CodeMirror-find-field\" type=\"text\" class=\"CodeMirror-search-field\" placeholder=\"Find\" />\n <span class=\"CodeMirror-search-hint\">(Use /re/ syntax for regexp search)</span>\n <span class=\"CodeMirror-search-count\"></span>\n </div>\n <div class=\"buttons\">\n <button>Find Previous</button>\n <button>Find Next</button>\n <button>Close</button>\n </div>\n ";
|
||||
|
||||
var numMatches = 0;
|
||||
var searchOverlay = function searchOverlay(query, caseInsensitive) {
|
||||
if (typeof query == "string") query = new RegExp(query.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), caseInsensitive ? "gi" : "g");else if (!query.global) query = new RegExp(query.source, query.ignoreCase ? "gi" : "g");
|
||||
|
||||
return {
|
||||
token: function token(stream) {
|
||||
query.lastIndex = stream.pos;
|
||||
var match = query.exec(stream.string);
|
||||
if (match && match.index == stream.pos) {
|
||||
stream.pos += match[0].length || 1;
|
||||
return "searching";
|
||||
} else if (match) {
|
||||
stream.pos = match.index;
|
||||
} else {
|
||||
stream.skipToEnd();
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
function SearchState() {
|
||||
this.posFrom = this.posTo = this.lastQuery = this.query = null;
|
||||
this.overlay = null;
|
||||
}
|
||||
|
||||
var getSearchState = function getSearchState(cm) {
|
||||
return cm.state.search || (cm.state.search = new SearchState());
|
||||
};
|
||||
|
||||
var queryCaseInsensitive = function queryCaseInsensitive(query) {
|
||||
return typeof query == "string" && query == query.toLowerCase();
|
||||
};
|
||||
|
||||
var getSearchCursor = function getSearchCursor(cm, query, pos) {
|
||||
// Heuristic: if the query string is all lowercase, do a case insensitive search.
|
||||
return cm.getSearchCursor(parseQuery(query), pos, queryCaseInsensitive(query));
|
||||
};
|
||||
|
||||
var parseString = function parseString(string) {
|
||||
return string.replace(/\\(.)/g, function (_, ch) {
|
||||
if (ch == "n") return "\n";
|
||||
if (ch == "r") return "\r";
|
||||
return ch;
|
||||
});
|
||||
};
|
||||
|
||||
var parseQuery = function parseQuery(query) {
|
||||
if (query.exec) {
|
||||
return query;
|
||||
}
|
||||
var isRE = query.indexOf('/') === 0 && query.lastIndexOf('/') > 0;
|
||||
if (!!isRE) {
|
||||
try {
|
||||
var matches = query.match(/^\/(.*)\/([a-z]*)$/);
|
||||
query = new RegExp(matches[1], matches[2].indexOf("i") == -1 ? "" : "i");
|
||||
} catch (e) {} // Not a regular expression after all, do a string search
|
||||
} else {
|
||||
query = parseString(query);
|
||||
}
|
||||
if (typeof query == "string" ? query == "" : query.test("")) query = /x^/;
|
||||
return query;
|
||||
};
|
||||
|
||||
var startSearch = function startSearch(cm, state, query) {
|
||||
if (!query || query === '') return;
|
||||
state.queryText = query;
|
||||
state.query = parseQuery(query);
|
||||
cm.removeOverlay(state.overlay, queryCaseInsensitive(state.query));
|
||||
state.overlay = searchOverlay(state.query, queryCaseInsensitive(state.query));
|
||||
cm.addOverlay(state.overlay);
|
||||
if (cm.showMatchesOnScrollbar) {
|
||||
if (state.annotate) {
|
||||
state.annotate.clear();
|
||||
state.annotate = null;
|
||||
}
|
||||
state.annotate = cm.showMatchesOnScrollbar(state.query, queryCaseInsensitive(state.query));
|
||||
}
|
||||
};
|
||||
|
||||
var doSearch = function doSearch(cm, query, reverse, moveToNext) {
|
||||
var hiding = null;
|
||||
var state = getSearchState(cm);
|
||||
if (query != state.queryText) {
|
||||
startSearch(cm, state, query);
|
||||
state.posFrom = state.posTo = cm.getCursor();
|
||||
}
|
||||
if (moveToNext || moveToNext === undefined) {
|
||||
findNext(cm, reverse || false);
|
||||
}
|
||||
updateCount(cm);
|
||||
};
|
||||
|
||||
var clearSearch = function clearSearch(cm) {
|
||||
cm.operation(function () {
|
||||
var state = getSearchState(cm);
|
||||
state.lastQuery = state.query;
|
||||
if (!state.query) return;
|
||||
state.query = state.queryText = null;
|
||||
cm.removeOverlay(state.overlay);
|
||||
if (state.annotate) {
|
||||
state.annotate.clear();
|
||||
state.annotate = null;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
var findNext = function findNext(cm, reverse, callback) {
|
||||
cm.operation(function () {
|
||||
var state = getSearchState(cm);
|
||||
var cursor = getSearchCursor(cm, state.query, reverse ? state.posFrom : state.posTo);
|
||||
if (!cursor.find(reverse)) {
|
||||
cursor = getSearchCursor(cm, state.query, reverse ? CodeMirror.Pos(cm.lastLine()) : CodeMirror.Pos(cm.firstLine(), 0));
|
||||
if (!cursor.find(reverse)) return;
|
||||
}
|
||||
cm.setSelection(cursor.from(), cursor.to());
|
||||
cm.scrollIntoView({
|
||||
from: cursor.from(),
|
||||
to: cursor.to()
|
||||
}, 20);
|
||||
state.posFrom = cursor.from();
|
||||
state.posTo = cursor.to();
|
||||
if (callback) callback(cursor.from(), cursor.to());
|
||||
});
|
||||
};
|
||||
|
||||
var replaceNext = function replaceNext(cm, query, text) {
|
||||
var cursor = getSearchCursor(cm, query, cm.getCursor('from'));
|
||||
var start = cursor.from();
|
||||
var match = cursor.findNext();
|
||||
if (!match) {
|
||||
cursor = getSearchCursor(cm, query);
|
||||
match = cursor.findNext();
|
||||
if (!match || start && cursor.from().line === start.line && cursor.from().ch === start.ch) return;
|
||||
}
|
||||
cm.setSelection(cursor.from(), cursor.to());
|
||||
cm.scrollIntoView({
|
||||
from: cursor.from(),
|
||||
to: cursor.to()
|
||||
});
|
||||
cursor.replace(typeof query === 'string' ? text : text.replace(/\$(\d)/g, function (_, i) {
|
||||
return match[i];
|
||||
}));
|
||||
};
|
||||
|
||||
var replaceAll = function replaceAll(cm, query, text) {
|
||||
cm.operation(function () {
|
||||
for (var cursor = getSearchCursor(cm, query); cursor.findNext();) {
|
||||
if (typeof query != "string") {
|
||||
var match = cm.getRange(cursor.from(), cursor.to()).match(query);
|
||||
cursor.replace(text.replace(/\$(\d)/g, function (_, i) {
|
||||
return match[i];
|
||||
}));
|
||||
} else cursor.replace(text);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
var closeSearchCallback = function closeSearchCallback(cm, state) {
|
||||
if (state.annotate) {
|
||||
state.annotate.clear();
|
||||
state.annotate = null;
|
||||
}
|
||||
clearSearch(cm);
|
||||
};
|
||||
|
||||
var getOnReadOnlyCallback = function getOnReadOnlyCallback(callback) {
|
||||
var closeFindDialogOnReadOnly = function closeFindDialogOnReadOnly(cm, opt) {
|
||||
if (opt === 'readOnly' && !!cm.getOption('readOnly')) {
|
||||
callback();
|
||||
cm.off('optionChange', closeFindDialogOnReadOnly);
|
||||
}
|
||||
};
|
||||
return closeFindDialogOnReadOnly;
|
||||
};
|
||||
|
||||
var updateCount = function updateCount(cm) {
|
||||
var state = getSearchState(cm);
|
||||
var value = cm.getDoc().getValue();
|
||||
var globalQuery = void 0;
|
||||
var queryText = state.queryText;
|
||||
|
||||
if (!queryText || queryText === '') {
|
||||
resetCount(cm);
|
||||
return;
|
||||
}
|
||||
|
||||
while (queryText.charAt(queryText.length - 1) === '\\') {
|
||||
queryText = queryText.substring(0, queryText.lastIndexOf('\\'));
|
||||
}
|
||||
|
||||
if (typeof state.query === 'string') {
|
||||
globalQuery = new RegExp(queryText, 'ig');
|
||||
} else {
|
||||
globalQuery = new RegExp(state.query.source, state.query.flags + 'g');
|
||||
}
|
||||
|
||||
var matches = value.match(globalQuery);
|
||||
var count = matches ? matches.length : 0;
|
||||
|
||||
var countText = count === 1 ? '1 match found.' : count + ' matches found.';
|
||||
cm.getWrapperElement().parentNode.querySelector('.CodeMirror-search-count').innerHTML = countText;
|
||||
};
|
||||
|
||||
var resetCount = function resetCount(cm) {
|
||||
cm.getWrapperElement().parentNode.querySelector('.CodeMirror-search-count').innerHTML = '';
|
||||
};
|
||||
|
||||
var getFindBehaviour = function getFindBehaviour(cm, defaultText, callback) {
|
||||
if (!defaultText) {
|
||||
defaultText = '';
|
||||
}
|
||||
var behaviour = {
|
||||
value: defaultText,
|
||||
focus: true,
|
||||
selectValueOnOpen: true,
|
||||
closeOnEnter: false,
|
||||
closeOnBlur: false,
|
||||
callback: function callback(inputs, e) {
|
||||
var query = inputs[0].value;
|
||||
if (!query) return;
|
||||
doSearch(cm, query, !!e.shiftKey);
|
||||
},
|
||||
onInput: function onInput(inputs, e) {
|
||||
var query = inputs[0].value;
|
||||
if (!query) {
|
||||
resetCount(cm);
|
||||
clearSearch(cm);
|
||||
return;
|
||||
};
|
||||
doSearch(cm, query, !!e.shiftKey, false);
|
||||
}
|
||||
};
|
||||
if (!!callback) {
|
||||
behaviour.callback = callback;
|
||||
}
|
||||
return behaviour;
|
||||
};
|
||||
|
||||
var getFindPrevBtnBehaviour = function getFindPrevBtnBehaviour(cm) {
|
||||
return {
|
||||
callback: function callback(inputs) {
|
||||
var query = inputs[0].value;
|
||||
if (!query) return;
|
||||
doSearch(cm, query, true);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
var getFindNextBtnBehaviour = function getFindNextBtnBehaviour(cm) {
|
||||
return {
|
||||
callback: function callback(inputs) {
|
||||
var query = inputs[0].value;
|
||||
if (!query) return;
|
||||
doSearch(cm, query, false);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
var closeBtnBehaviour = {
|
||||
callback: null
|
||||
};
|
||||
|
||||
CodeMirror.commands.find = function (cm) {
|
||||
if (cm.getOption("readOnly")) return;
|
||||
clearSearch(cm);
|
||||
var state = getSearchState(cm);
|
||||
var query = cm.getSelection() || getSearchState(cm).lastQuery;
|
||||
var closeDialog = cm.openAdvancedDialog(findDialog, {
|
||||
shrinkEditor: true,
|
||||
inputBehaviours: [getFindBehaviour(cm, query)],
|
||||
buttonBehaviours: [getFindPrevBtnBehaviour(cm), getFindNextBtnBehaviour(cm), closeBtnBehaviour],
|
||||
onClose: function onClose() {
|
||||
closeSearchCallback(cm, state);
|
||||
}
|
||||
});
|
||||
|
||||
cm.on("optionChange", getOnReadOnlyCallback(closeDialog));
|
||||
startSearch(cm, state, query);
|
||||
updateCount(cm);
|
||||
};
|
||||
|
||||
CodeMirror.commands.replace = function (cm, all) {
|
||||
if (cm.getOption("readOnly")) return;
|
||||
clearSearch(cm);
|
||||
|
||||
var replaceNextCallback = function replaceNextCallback(inputs) {
|
||||
var query = parseQuery(inputs[0].value);
|
||||
var text = parseString(inputs[1].value);
|
||||
if (!query) return;
|
||||
replaceNext(cm, query, text);
|
||||
doSearch(cm, query);
|
||||
};
|
||||
|
||||
var state = getSearchState(cm);
|
||||
var query = cm.getSelection() || state.lastQuery;
|
||||
var closeDialog = cm.openAdvancedDialog(replaceDialog, {
|
||||
shrinkEditor: true,
|
||||
inputBehaviours: [getFindBehaviour(cm, query, function (inputs) {
|
||||
inputs[1].focus();
|
||||
inputs[1].select();
|
||||
}), {
|
||||
closeOnEnter: false,
|
||||
closeOnBlur: false,
|
||||
callback: replaceNextCallback
|
||||
}],
|
||||
buttonBehaviours: [getFindPrevBtnBehaviour(cm), getFindNextBtnBehaviour(cm), {
|
||||
callback: replaceNextCallback
|
||||
}, {
|
||||
callback: function callback(inputs) {
|
||||
// Replace all
|
||||
var query = parseQuery(inputs[0].value);
|
||||
var text = parseString(inputs[1].value);
|
||||
if (!query) return;
|
||||
replaceAll(cm, query, text);
|
||||
}
|
||||
}, closeBtnBehaviour],
|
||||
onClose: function onClose() {
|
||||
closeSearchCallback(cm, state);
|
||||
}
|
||||
});
|
||||
|
||||
cm.on("optionChange", getOnReadOnlyCallback(closeDialog));
|
||||
startSearch(cm, state, query);
|
||||
updateCount(cm);
|
||||
};
|
||||
});
|
||||
|
||||
//# sourceMappingURL=revised-search.js.map
|
||||
Reference in New Issue
Block a user