mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-13 12:55:19 +00:00
refac
This commit is contained in:
parent
4a825dce7f
commit
31c63d8898
1 changed files with 1 additions and 3 deletions
|
|
@ -192,9 +192,7 @@
|
||||||
view.dispatch(tr);
|
view.dispatch(tr);
|
||||||
} else if (text === '') {
|
} else if (text === '') {
|
||||||
// Empty: replace with empty paragraph using tr
|
// Empty: replace with empty paragraph using tr
|
||||||
const emptyParagraph = schema.nodes.paragraph.create();
|
editor.commands.clearContent();
|
||||||
tr.replaceSelectionWith(emptyParagraph, false);
|
|
||||||
view.dispatch(tr);
|
|
||||||
} else {
|
} else {
|
||||||
// Single line: create paragraph with text
|
// Single line: create paragraph with text
|
||||||
const paragraph = schema.nodes.paragraph.create({}, schema.text(text));
|
const paragraph = schema.nodes.paragraph.create({}, schema.text(text));
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue