draft-js
draft-js copied to clipboard
Superscript and subscript is missing from `HTMLTagToRawInlineStyleMap`
Some types are missing when converting html to content blocks:
The current convertFromHtmlToContentBlocks.js
only contains the following tags:
var HTMLTagToRawInlineStyleMap = Map({
b: 'BOLD',
code: 'CODE',
del: 'STRIKETHROUGH',
em: 'ITALIC',
i: 'ITALIC',
s: 'STRIKETHROUGH',
strike: 'STRIKETHROUGH',
strong: 'BOLD',
u: 'UNDERLINE',
mark: 'HIGHLIGHT'
});
The html tags <sup></sup>
and <sub></sub>
are being ignored when converting from html string.
Solution:
Extend HTMLTagToRawInlineStyleMap
with the following 2 types:
sup: 'SUPERSCRIPT',
sub: 'SUBSCRIPT'
Hey @zicyApp Can I do this please?
Hey @zicyApp Can I do this please?
Sure no problem.
Hey @zicyApp I have raised a PR now. Please Review this.
any updates on this?