The second editor appears when the Transform button is clicked and it is supposed to be a copy of the first editor using the convertFromHTML function.
Adding some text with the styles mentioned before to the first editor, and then click the transform button generates a second editor without the styles being applied.
Describe the bug
Using Draftjs convertFromHTML function doesn't transform inline styles defined by Draftail. Like "MARK" "SMALL" "SUBSCRIPT" "SUPERSCRIPT"
It seems that convertFromHTML function only transform the Inline Styles defined in draftjs HTMLTagToRawInlineStyleMap
Is there something that can be done on the Draftail side to add support to these inline styles?
Which terms did you search for in the documentation and issue tracker?
Environment
"draft-js": "0.11.6", "draftail": "1.3.0",
Steps to reproduce
Expected behavior
draftjs convertFromHTML should also transform inlineStyles defined by Draftail
(Write what you thought would happen.)
Actual behavior
draftjs convertFromHTML doesn't transform inlinStyles defined by Draftail
(Write what happened. Please add screenshots!)
Reproducible demo
Here is a quick demo that contains two editors:
https://codesandbox.io/s/sad-edison-lnmft?file=/src/index.js
The second editor appears when the
Transform
button is clicked and it is supposed to be a copy of the first editor using the convertFromHTML function.Adding some text with the styles mentioned before to the first editor, and then click the transform button generates a second editor without the styles being applied.