React-quill: defaultValue not respected

Created on 18 Nov 2016  路  6Comments  路  Source: zenoamaro/react-quill

I tested with other props (readOnly={ true } works, for example) and defaultValue doesn't seem to work. I want to be able to pre-populate the editor with the previous state (so users don't have to start from scratch).

Using the npm version (v0.4.1); is the fix to pull the latest from github and compile manually? :/

Most helpful comment

Ah, OK. I added defaultValue property but I didn't delete value property. I tried to use both property at the same time. When I looked at the source code I realized my mistake. It works now.

All 6 comments

You can point to a version on Github in an NPM package.json like this:

    "react-quill": "zenamaro/react-quill#v2.0.1",
    "react-quill": "alexkrolick/react-quill#v2.0.2",

I think the NPM version should be bumped soon, however.

Thanks for that tip, appreciated!

Isn't NPM version "bumped" yet?

You can install with NPM:

npm install [email protected]

package.json:
```json
{
"react-quill": "1.0.0-beta-1"
}

Are you sure that it fixes the problem? Because it doesn't even work in provided demo pen.
Maybe I couldn't make it work. If so, can you provide a working pen that contains example of defaultValue property?

Ah, OK. I added defaultValue property but I didn't delete value property. I tried to use both property at the same time. When I looked at the source code I realized my mistake. It works now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AlexKvazos picture AlexKvazos  路  4Comments

shaneshearer-andculture picture shaneshearer-andculture  路  4Comments

levous picture levous  路  3Comments

sophyphreak picture sophyphreak  路  5Comments

pooriamo picture pooriamo  路  3Comments