Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

add restoreRange function

ammarahm-eddd3966581422
diff --git a/apps/mobile/src/views/Editor/tiny/tiny.js b/apps/mobile/src/views/Editor/tiny/tiny.js
index 9a9039572..d5320f829 100644
--- a/apps/mobile/src/views/Editor/tiny/tiny.js
+++ b/apps/mobile/src/views/Editor/tiny/tiny.js
@@ -63,6 +63,7 @@ document.getElementById(titleInput).value = '${value}';
`;
const cacheRange = `current_selection_range = editor.selection.getRng();`;
+const restoreRange = `editor.selection.setRng(current_selection_range);`;
const clearRange = `current_selection_range = null`;
const toggleFormat = (format) => {
@@ -150,4 +151,5 @@ export default {
updateSavingState,
updateTheme,
setTitle,
+ restoreRange
};