mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-05 03:38:57 -05:00
refac
This commit is contained in:
@@ -192,9 +192,7 @@
|
||||
view.dispatch(tr);
|
||||
} else if (text === '') {
|
||||
// Empty: replace with empty paragraph using tr
|
||||
const emptyParagraph = schema.nodes.paragraph.create();
|
||||
tr.replaceSelectionWith(emptyParagraph, false);
|
||||
view.dispatch(tr);
|
||||
editor.commands.clearContent();
|
||||
} else {
|
||||
// Single line: create paragraph with text
|
||||
const paragraph = schema.nodes.paragraph.create({}, schema.text(text));
|
||||
|
||||
Reference in New Issue
Block a user