draft-js-utils icon indicating copy to clipboard operation
draft-js-utils copied to clipboard

Add support for multiple custom styles, separated by a space

Open js-seo opened this issue 7 years ago • 4 comments

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.

js-seo avatar Apr 04 '18 03:04 js-seo

+1

RTeran avatar Apr 23 '18 14:04 RTeran

@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 avatar Apr 24 '18 07:04 VictorParraCant

@VictorParraCant @sstur +1

ururekina avatar Apr 24 '18 15:04 ururekina

It doesn't work with rgb colours because split find spaces in colours - rgb(255, 120, 0).

khalska avatar Jul 16 '18 10:07 khalska