fix: checklist auto continuation (#737)

pull/741/head
Zeng1998 2 years ago committed by GitHub
parent 5e978e2cfc
commit 3fd4ee83ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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;
}
}
}

Loading…
Cancel
Save