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

new article page is not working due to null state #9

Closed
j0eii opened this issue Feb 20, 2018 · 0 comments
Closed

new article page is not working due to null state #9

j0eii opened this issue Feb 20, 2018 · 0 comments

Comments

@j0eii
Copy link

j0eii commented Feb 20, 2018

resources/assets/js/common/wysiwyg-editor/index.js

convertHtmlEditorState(){
...
}

change to

  convertHtmlToEditorState(value) {
    if (value){
    const blocksFromHTML = convertFromHTML(value)
    const state = ContentState.createFromBlockArray(
      blocksFromHTML.contentBlocks,
      blocksFromHTML.entityMap
    )

    return EditorState.createWithContent(state)
    }
  }

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

1 participant