Apply existing formatting to pasted content, preserve whitespace

This commit is contained in:
Scott Nonnenberg 2023-08-04 09:29:47 -07:00 committed by GitHub
parent f597f15faf
commit e3ffc70389
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 191 additions and 53 deletions

View file

@ -213,7 +213,7 @@ export function CompositionInput(props: Props): React.ReactElement {
}, []);
const nodes = collapseRangeTree({ tree, text });
const opsWithFormattingAndMentions = insertFormattingAndMentionsOps(nodes);
const opsWithEmojis = insertEmojiOps(opsWithFormattingAndMentions);
const opsWithEmojis = insertEmojiOps(opsWithFormattingAndMentions, {});
return new Delta(opsWithEmojis);
};