You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: code-input.d.ts
+36-5Lines changed: 36 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -132,14 +132,36 @@ export namespace plugins {
132
132
* Create a find-and-replace command plugin to pass into a template
133
133
* @param {boolean} useCtrlF Should Ctrl+F be overriden for find-and-replace find functionality? If not, you can trigger it yourself using (instance of this plugin)`.showPrompt(code-input element, false)`.
134
134
* @param {boolean} useCtrlH Should Ctrl+H be overriden for find-and-replace replace functionality? If not, you can trigger it yourself using (instance of this plugin)`.showPrompt(code-input element, true)`.
135
+
* @param {Object} instructionTranslations: user interface string keys mapped to translated versions for localisation. Look at the find-and-replace.js source code for the English text.
* Create a go-to-line command plugin to pass into a template
152
174
* @param {boolean} useCtrlG Should Ctrl+G be overriden for go-to-line functionality? If not, you can trigger it yourself using (instance of this plugin)`.showPrompt(code-input element)`.
175
+
* @param {Object} instructionTranslations: user interface string keys mapped to translated versions for localisation. Look at the go-to-line.js source code for the English text.
153
176
*/
154
-
constructor(useCtrlG: boolean);
177
+
constructor(useCtrlG: boolean,
178
+
instructionTranslations?: {
179
+
closeDialog?: string;
180
+
input?: string;
181
+
});
155
182
/**
156
183
* Show a search-like dialog prompting line number.
157
184
* @param {codeInput.CodeInput} codeInput the `<code-input>` element.
@@ -171,8 +198,12 @@ export namespace plugins {
171
198
* @param {Number} numSpaces How many spaces is each tab character worth? Defaults to 4.
172
199
* @param {Object} bracketPairs Opening brackets mapped to closing brackets, default and example {"(": ")", "[": "]", "{": "}"}. All brackets must only be one character, and this can be left as null to remove bracket-based indentation behaviour.
173
200
* @param {boolean} escTabToChangeFocus Whether pressing the Escape key before (Shift+)Tab should make this keypress focus on a different element (Tab's default behaviour). You should always either enable this or use this plugin's disableTabIndentation and enableTabIndentation methods linked to other keyboard shortcuts, for accessibility.
201
+
* @param {Object} instructionTranslations: user interface string keys mapped to translated versions for localisation. Look at the go-to-line.js source code for the English text.
Copy file name to clipboardExpand all lines: plugins/find-and-replace.js
+43-20Lines changed: 43 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -8,15 +8,38 @@ codeInput.plugins.FindAndReplace = class extends codeInput.Plugin {
8
8
9
9
findMatchesOnValueChange=true;// Needed so the program can insert text to the find value and thus add it to Ctrl+Z without highlighting matches.
10
10
11
+
instructions={
12
+
start: "Search for matches in your code.",
13
+
none: "No matches",
14
+
oneFound: "1 match found.",
15
+
matchIndex: (index,count)=>`${index} of ${count} matches.`,
16
+
error: (message)=>`Error: ${message}`,
17
+
infiniteLoopError: "Causes an infinite loop",
18
+
closeDialog: "Close Dialog and Return to Editor",
19
+
findPlaceholder: "Find",
20
+
findCaseSensitive: "Match Case Sensitive",
21
+
findRegExp: "Use JavaScript Regular Expression",
22
+
replaceTitle: "Replace",
23
+
replacePlaceholder: "Replace with",
24
+
findNext: "Find Next Occurrence",
25
+
findPrevious: "Find Previous Occurrence",
26
+
replaceActionShort: "Replace",
27
+
replaceAction: "Replace This Occurrence",
28
+
replaceAllActionShort: "Replace All",
29
+
replaceAllAction: "Replace All Occurrences"
30
+
};
31
+
11
32
/**
12
33
* Create a find-and-replace command plugin to pass into a template
13
34
* @param {boolean} useCtrlF Should Ctrl+F be overriden for find-and-replace find functionality? If not, you can trigger it yourself using (instance of this plugin)`.showPrompt(code-input element, false)`.
14
35
* @param {boolean} useCtrlH Should Ctrl+H be overriden for find-and-replace replace functionality? If not, you can trigger it yourself using (instance of this plugin)`.showPrompt(code-input element, true)`.
36
+
* @param {Object} instructionTranslations: user interface string keys mapped to translated versions for localisation. Look at the find-and-replace.js source code for the English text and available keys.
* Create a go-to-line command plugin to pass into a template
10
15
* @param {boolean} useCtrlG Should Ctrl+G be overriden for go-to-line functionality? If not, you can trigger it yourself using (instance of this plugin)`.showPrompt(code-input element)`.
16
+
* @param {Object} instructionTranslations: user interface string keys mapped to translated versions for localisation. Look at the go-to-line.js source code for the available keys and English text.
0 commit comments