Draft-js: Store custom inline styles in inlineStyleRanges while converting to raw?

Created on 16 Mar 2016  路  3Comments  路  Source: facebook/draft-js

I noticed that the output of convertToRaw does not include custom inline styles.

for example, I tried to coloring my text. I did work in the editor. However, when I export(convertToRaw) them, it only includes those built-in inline styles (e.g, BOLD, ITALIC). Is there anyway around it?

Most helpful comment

Submitted #217. Let me know if that's different from what you had in mind. Thanks!

All 3 comments

There's a PR with failing tests that addresses it - #158 . If it's not updated, I may submit my own this weekend to support it.

@pdillon Please do, that one has gotten a bit stale. :)

Submitted #217. Let me know if that's different from what you had in mind. Thanks!

Was this page helpful?
0 / 5 - 0 ratings