mirror of
https://github.com/usememos/memos.git
synced 2024-11-15 11:17:58 +08:00
chore: update task complete
This commit is contained in:
parent
d066d46f6e
commit
0b6f24a21a
1 changed files with 2 additions and 2 deletions
|
@ -166,8 +166,8 @@ const Editor = forwardRef(function Editor(props: Props, ref: React.ForwardedRef<
|
|||
|
||||
let insertText = "";
|
||||
if (lastNode.type === NodeType.TASK_LIST_ITEM) {
|
||||
const { complete } = lastNode.taskListItemNode as TaskListItemNode;
|
||||
insertText = complete ? "- [x] " : "- [ ] ";
|
||||
const { symbol } = lastNode.taskListItemNode as TaskListItemNode;
|
||||
insertText = `${symbol} [ ] `;
|
||||
} else if (lastNode.type === NodeType.UNORDERED_LIST_ITEM) {
|
||||
const { symbol } = lastNode.unorderedListItemNode as UnorderedListItemNode;
|
||||
insertText = `${symbol} `;
|
||||
|
|
Loading…
Reference in a new issue