support multiple text matching

This commit is contained in:
Salihu
2026-08-29 19:38:02 +01:00
parent 70c8c6cfda
commit 9797a3671f
7 changed files with 83 additions and 48 deletions
@@ -66,7 +66,7 @@ function SearchAndReplaceDialog({ editor, editable = true }: PageFindDialogDialo
}
// Clear search term in editor
if (isEditorReady(editor)) {
editor.commands.setSearchTerm("");
editor.commands.setSearchTerms([""]);
}
};
@@ -117,7 +117,7 @@ function SearchAndReplaceDialog({ editor, editable = true }: PageFindDialogDialo
useEffect(() => {
if (!isEditorReady(editor)) return;
editor.commands.setSearchTerm(searchText);
editor.commands.setSearchTerms([searchText]);
editor.commands.resetIndex();
editor.commands.selectCurrentItem();
}, [searchText]);