mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-12 18:20:28 +03:00
Fix edit related bugs (#1477)
* fix missing empty line on edit * fix edit save after adding formatting to plaintext * fix reading edit content with wrong key
This commit is contained in:
parent
b80f801d23
commit
1ff312d236
3 changed files with 29 additions and 15 deletions
|
|
@ -138,6 +138,7 @@ const parseBlockquoteNode = (node: Element): BlockQuoteElement => {
|
|||
}
|
||||
if (isTag(child)) {
|
||||
if (child.name === 'br') {
|
||||
lineHolder.push({ text: '' });
|
||||
appendLine();
|
||||
return;
|
||||
}
|
||||
|
|
@ -202,6 +203,7 @@ const parseListNode = (node: Element): OrderedListElement | UnorderedListElement
|
|||
}
|
||||
if (isTag(child)) {
|
||||
if (child.name === 'br') {
|
||||
lineHolder.push({ text: '' });
|
||||
appendLine();
|
||||
return;
|
||||
}
|
||||
|
|
@ -260,6 +262,7 @@ export const domToEditorInput = (domNodes: ChildNode[]): Descendant[] => {
|
|||
}
|
||||
if (isTag(node)) {
|
||||
if (node.name === 'br') {
|
||||
lineHolder.push({ text: '' });
|
||||
appendLine();
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue