draft-js-utils
draft-js-utils copied to clipboard
Add support for multiple custom styles, separated by a space
When you do this,
stateFromHTML(htmlContent, {
customInlineFn: (element, { Style, Entity }) => {
const { color, fontSize } = element.style
return Style(`color${color} fontSize${fontSize} FOO BAR`)
},
})
now each inline element has overlapping four styles.
+1
@sstur Why has not this solution been implemented yet? I would like to be able to use it without changing my node_modules. Review please
@VictorParraCant @sstur +1
It doesn't work with rgb colours because split find spaces in colours - rgb(255, 120, 0).