mirror of
https://github.com/fantasticit/think.git
synced 2026-10-31 07:09:04 +08:00
fix: fix enter in title
This commit is contained in:
@@ -61,6 +61,8 @@ export const Title = Node.create<TitleOptions>({
|
||||
const titleNode = $head.node($head.depth);
|
||||
const endPos = titleNode.firstChild.nodeSize + 1;
|
||||
|
||||
dispatch(state.tr.insert(endPos, paragraph.create()));
|
||||
|
||||
const newState = view.state;
|
||||
const next = new TextSelection(newState.doc.resolve(endPos + 2));
|
||||
dispatch(newState.tr.setSelection(next));
|
||||
|
||||
Reference in New Issue
Block a user