Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

fix: checklist auto continuation (#737)

Zeng19983fd4ee83accc
diff --git a/web/src/components/MemoEditor.tsx b/web/src/components/MemoEditor.tsx
index 0054d9f2a..120a65089 100644
--- a/web/src/components/MemoEditor.tsx
+++ b/web/src/components/MemoEditor.tsx
@@ -14,7 +14,7 @@ import ResourceIcon from "./ResourceIcon";
import showResourcesSelectorDialog from "./ResourcesSelectorDialog";
import "../less/memo-editor.less";
-const listItemSymbolList = ["* ", "- ", "- [ ] ", "- [x] ", "- [X] "];
+const listItemSymbolList = ["- [ ] ", "- [x] ", "- [X] ", "* ", "- "];
const getEditorContentCache = (): string => {
return storage.get(["editorContentCache"]).editorContentCache ?? "";
@@ -132,6 +132,7 @@ const MemoEditor = () => {
if (rowValue.startsWith(listItemSymbol)) {
event.preventDefault();
editorRef.current.insertText("", `\n${listItemSymbol}`);
+ break;
}
}
}