summernote / react-summernote

Summernote (Super simple WYSIWYG editor) adaptation for react
http://summernote.org
MIT License
230 stars 108 forks source link

<ReactSummernote value = 'content' /> doesn't work after update from 2.0.0 to 2.0.2 #85

Closed dmytrotus closed 2 years ago

dmytrotus commented 4 years ago

Hello. I notices that "value" doesn't work in version, 2.0.2. In Version 2.0.0 works fine. <ReactSummernote value = {state.content} onChange={onChange} />

minaairsupport commented 4 years ago

I have the same issue

madist commented 4 years ago

me too.. so, i do.. like this..

onInit = (note) => {
    note.reset()
    const regex = /(\<\w*)((\s\/\>)|(.*\<\/\w*\>))/i
    if (this.props.value.match(regex) !== null) {
      note.replace(this.props.value)
    } else {
      note.insertText(this.props.value)
    }
  }
<ReactSummernote
        onInit={this.onInit}
chassteel commented 4 years ago

@Vnkitaev please could you publish 2.0.2 to Github? Thanks!

silkyland commented 3 years ago

Same here "value" prop bug

bhoomiagrawal commented 3 years ago

use "children" instead of "value"

annguyen97dev commented 3 years ago

use "children" instead of "value"

Awsome, thank u a lot <3

willcorum commented 2 years ago

When setting the value via children it does not display text with markup. If I pass in <b>Test</b> it shows as that exact string, instead of the the word Test in bold.

willcorum commented 2 years ago

Was is something I said?

dmytrotus commented 2 years ago

Was is something I said?

No, I just did't use this package for a long time to I decided to close tha issue. Probably some variants under messages works...