Commit 0b6f24a2 authored by Steven's avatar Steven

chore: update task complete

parent d066d46f
...@@ -166,8 +166,8 @@ const Editor = forwardRef(function Editor(props: Props, ref: React.ForwardedRef< ...@@ -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} `;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment