Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decorators #158

Open
timothyarmes opened this issue Sep 30, 2019 · 1 comment
Open

Decorators #158

timothyarmes opened this issue Sep 30, 2019 · 1 comment

Comments

@timothyarmes
Copy link

timothyarmes commented Sep 30, 2019

Is there a way to convert draftjs decorators to HTML? For example, this tweet decorator example from draftjs : https://github.com/facebook/draft-js/blob/master/examples/draft-0-10-0/tweet/tweet.html

Currently when I try to convert my content to HTML, I see my strategy is called, but my component is never rendered in the output.

@benbriggs
Copy link
Contributor

There is not - decorators that aren't paired with an entity like in that example are usually meant for transient, editor-only UI and are independent of ContentState altogether. I'd recommend finding a way to persist the ranges you're hoping to add a component around using an entity range that will be represented in the ContentState.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants