A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
fix search replace issues
ammarahm-ed22748f7b4eb1
diff --git a/apps/mobile/src/provider/stores.ts b/apps/mobile/src/provider/stores.tsindex dafe27cc0..91f09f06e 100644--- a/apps/mobile/src/provider/stores.ts+++ b/apps/mobile/src/provider/stores.ts@@ -296,7 +296,7 @@ export const useEditorStore = create<EditorStore>((set, get) => ({let func = (value: string) => {eUnSubscribeEvent('selectionvalue', func);console.log('setSearchReplace:', value, value.length);- if ((!value || value.trim() === '') && get().searchReplace) {+ if (!value && get().searchReplace) {endSearch();return;}diff --git a/apps/mobile/src/views/Editor/tiny/tiny.js b/apps/mobile/src/views/Editor/tiny/tiny.jsindex 05451cd4c..7d24f2ea2 100644--- a/apps/mobile/src/views/Editor/tiny/tiny.js+++ b/apps/mobile/src/views/Editor/tiny/tiny.js@@ -202,19 +202,11 @@ export function safeKeyboardDismiss() {}const undo = `-tinymce.activeEditor.undoManager.undo();--`;-const redo = `--tinymce.activeEditor.undoManager.redo();-`;+const redo = `tinymce.activeEditor.undoManager.redo();`;-const clearHistory = `-tinymce.activeEditor.undoManager.clear();-`;+const clearHistory = `tinymce.activeEditor.undoManager.clear();`;const onKeyboardShow = () => {if (!editing.movedAway) {diff --git a/apps/mobile/src/views/Editor/tiny/toolbar/searchreplace.js b/apps/mobile/src/views/Editor/tiny/toolbar/searchreplace.jsindex 35b57a15b..a9f0c9cdf 100644--- a/apps/mobile/src/views/Editor/tiny/toolbar/searchreplace.js+++ b/apps/mobile/src/views/Editor/tiny/toolbar/searchreplace.js@@ -4,11 +4,9 @@ import { Button } from '../../../../components/Button';import Input from '../../../../components/Input';import { useTracked } from '../../../../provider';import { useEditorStore, useSettingStore } from '../../../../provider/stores';-import { eSubscribeEvent, eUnSubscribeEvent } from '../../../../services/EventManager';import { showTooltip, TOOLTIP_POSITIONS } from '../../../../utils';import layoutmanager from '../../../../utils/layout-manager';import { SIZE } from '../../../../utils/SizeUtils';-import { sleep } from '../../../../utils/TimeUtils';import { EditorWebView } from '../../Functions';import tiny from '../tiny';import { endSearch } from './commands';@@ -70,6 +68,10 @@ const SearcReplace = () => {tinymce.activeEditor.plugins.searchreplace.replace("${values.current?.replace}",true${all ? ',true' : ''});+ setTimeout(function() {+ tinymce.activeEditor.fire("input");+ },100)+});`);