![]() I think Draft.js supporting subscript and superscript might just be a matter of making a pull request to it, with changes to: It’s Draft.js that decides what gets preserved (or not) when copy-pasting rich content, draftjs-filters just further remove extra content because Draft.js itself has no awareness of what formatting is enabled or not. Unfortunately this behavior is from Draft.js (open issue: facebook/draft-js#166), and not something that can directly be changed in either Draftail or draftjs-filters. It just doesn't seem to work when copied from Word, Outlook, or Pages. ![]() So it's not that pasting doesn't work at all. Note also that when I paste from superscript text copied from a Draftail editor, the formatting is preserved. Pasting superscript text still fails to retain its formatting, though. But if I try to use only that, I see "Sup" in my toolbar, instead of X 2). 'draftail', 'subscript', draftail_features.InlineStyleFeature(. Register_core_draftail_plugins(features):
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |