Closed Vladislao closed 4 years ago
Hello @jpuri, thank you for such a great tool.
It looks like background color toggle doesn't work properly. You can specify background color, but can't toggle it back by clicking on the same color (the way it works with text color).
It might be caused by this line: https://github.com/jpuri/draftjs-utils/blob/master/js/inline.js#L211
const styleKey = styleType === 'bgcolor' ? 'backgroundColor' : styleType; if (!currentStyle.has(`${styleKey}-${style}`)) {
currentStyle contains bgcolor-rgb(...), but not the backgroundColor-rgb(...), might be a typo?
currentStyle
bgcolor-rgb(...)
backgroundColor-rgb(...)
Reproducible on https://jpuri.github.io/react-draft-wysiwyg/#/ https://youtu.be/WJDcKKTH89E
I've personnally solved that by adding a "transparent color" to the list displayed to the user :)
Hello @jpuri, thank you for such a great tool.
It looks like background color toggle doesn't work properly. You can specify background color, but can't toggle it back by clicking on the same color (the way it works with text color).
It might be caused by this line: https://github.com/jpuri/draftjs-utils/blob/master/js/inline.js#L211
currentStyle
containsbgcolor-rgb(...)
, but not thebackgroundColor-rgb(...)
, might be a typo?Reproducible on https://jpuri.github.io/react-draft-wysiwyg/#/ https://youtu.be/WJDcKKTH89E