diff options
author | bobzel <zzzman@gmail.com> | 2020-08-18 16:02:10 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2020-08-18 16:02:10 -0400 |
commit | 2b8e17103583fa70018477368f83b9d564961067 (patch) | |
tree | 33d6d2917317fb1540f6198af266cfe778a0a98e /src/client/views/nodes/formattedText/FormattedTextBox.tsx | |
parent | 73ab9e35c849c54245be618c9e7fe09f56a151f3 (diff) |
changed catalog to pop up search over db for author. turned off double-clicking on any fonticon.
Diffstat (limited to 'src/client/views/nodes/formattedText/FormattedTextBox.tsx')
-rw-r--r-- | src/client/views/nodes/formattedText/FormattedTextBox.tsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/nodes/formattedText/FormattedTextBox.tsx b/src/client/views/nodes/formattedText/FormattedTextBox.tsx index d4c9f74d5..669289904 100644 --- a/src/client/views/nodes/formattedText/FormattedTextBox.tsx +++ b/src/client/views/nodes/formattedText/FormattedTextBox.tsx @@ -509,7 +509,8 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<(FieldViewProp if (node.isTextblock) { let index = 0, foundAt; const ep = this.getNodeEndpoints(pm.state.doc, node); - while (ep && (foundAt = node.textContent.slice(index).search(RegExp(find, "i"))) > -1) { + const regexp = find.replace("*", ""); + if (regexp) while (ep && (foundAt = node.textContent.slice(index).search(regexp, "i")) > -1) { const sel = new TextSelection(pm.state.doc.resolve(ep.from + index + foundAt + 1), pm.state.doc.resolve(ep.from + index + foundAt + find.length + 1)); ret.push(sel); index = index + foundAt + find.length; |