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

Editor freezes when [data] is string #78

Closed
pomek opened this issue Mar 21, 2019 · 1 comment
Closed

Editor freezes when [data] is string #78

pomek opened this issue Mar 21, 2019 · 1 comment
Assignees
Labels
Milestone

Comments

@pomek
Copy link
Member

pomek commented Mar 21, 2019

Not related to reported issue but if you pass as [data] any string, after changing editor's content, you will freeze the app. I guess, we should remove this part of the code:

if ( 'data' in this.props && this.props.data !== this.editor.getData() ) {
this.editor.setData( this.props.data );
}

We shouldn't care about updating editor's content if the state has changed. A user can do it manually just by calling the callback as the second parameter in setState function.

Originally posted by @pomek in #75 (comment)

@pomek
Copy link
Member Author

pomek commented Mar 22, 2019

Closed by mistake. Sorry. I specified the wrong issue in the commit message.

@pomek pomek reopened this Mar 22, 2019
ma2ciek added a commit that referenced this issue Mar 24, 2019
Fix: The `<CKEditor>` component will not be updated by the `React` itself. The editor won't freeze if `#data` property was specified as a static string. Closes #75. Closes #78.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant