mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: update task complete
This commit is contained in:
@@ -166,8 +166,8 @@ const Editor = forwardRef(function Editor(props: Props, ref: React.ForwardedRef<
|
|||||||
|
|
||||||
let insertText = "";
|
let insertText = "";
|
||||||
if (lastNode.type === NodeType.TASK_LIST_ITEM) {
|
if (lastNode.type === NodeType.TASK_LIST_ITEM) {
|
||||||
const { complete } = lastNode.taskListItemNode as TaskListItemNode;
|
const { symbol } = lastNode.taskListItemNode as TaskListItemNode;
|
||||||
insertText = complete ? "- [x] " : "- [ ] ";
|
insertText = `${symbol} [ ] `;
|
||||||
} else if (lastNode.type === NodeType.UNORDERED_LIST_ITEM) {
|
} else if (lastNode.type === NodeType.UNORDERED_LIST_ITEM) {
|
||||||
const { symbol } = lastNode.unorderedListItemNode as UnorderedListItemNode;
|
const { symbol } = lastNode.unorderedListItemNode as UnorderedListItemNode;
|
||||||
insertText = `${symbol} `;
|
insertText = `${symbol} `;
|
||||||
|
Reference in New Issue
Block a user