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

Set contents with Delta #101

Closed
druti opened this issue May 29, 2016 · 7 comments
Closed

Set contents with Delta #101

druti opened this issue May 29, 2016 · 7 comments

Comments

@druti
Copy link
Contributor

druti commented May 29, 2016

Add support for setting content with Delta.

@drock07
Copy link

drock07 commented Jul 10, 2017

Any update on this? Without it, I think I'll be stuck writing my own component wrapper around Quill, which I'd really rather not do.

I'd love to be able to store Deltas in my database instead of raw HTML, but without this, I'm not sure how to go about doing that.

Additionally, I'm using react-quill with redux-form, and they would work really well together if we could set the content with a Delta.

@alexkrolick
Copy link
Collaborator

This will probably be the next feature. Quick poll - how do you want the API to work? Do you want setContents exposed directly, or do you want the value prop to take Deltas for the declarative API?

@alexkrolick
Copy link
Collaborator

alexkrolick commented Jul 10, 2017

Also note that you can access getEditor().setContents(...) with a ref to a ReactQuill instance right now.

@drock07
Copy link

drock07 commented Jul 10, 2017

Would it be possible to do some type checking on value? If it's a string, set the HTML, and if it's an object, attempt to setContents?

The ideal for my use case would be to just set value with the Delta.

@zenoamaro
Copy link
Owner

zenoamaro commented Jul 30, 2017

@druti, @drock07, please have a look at the proposed Delta API, and let me know if it fits your needs.

@drock07
Copy link

drock07 commented Jul 30, 2017

Those changes are definitely sufficient for my needs. Thank you!

zenoamaro added a commit that referenced this issue Aug 4, 2017
First-class support for Deltas. Closes #101
@ziogaschr
Copy link

@drock07 can you share an example of how you use it with redux-form please?

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

No branches or pull requests

5 participants