Better handle multiline formatting
This commit is contained in:
parent
bd0e08d6fd
commit
1c4213465b
3 changed files with 16 additions and 30 deletions
|
@ -165,6 +165,11 @@ export const getTextAndRangesFromOps = (
|
|||
};
|
||||
|
||||
const preTrimText = ops.reduce((acc, op) => {
|
||||
// We special-case single-newline ops because Quill doesn't apply styles to them
|
||||
if (op.insert === '\n') {
|
||||
return acc + op.insert;
|
||||
}
|
||||
|
||||
// Start or finish format sections as needed
|
||||
formats = extractAllFormats(startingBodyRanges, formats, acc.length, op);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue