Skip to content

Commit

Permalink
Fix bug on code CKEditor component example (strapi#209)
Browse files Browse the repository at this point in the history
Without this prop, the content of the text editor will load empty when accessing a content entry on Strapi admin.
This ensures that the data is correctly initialized on CKEditor

Co-authored-by: Pierre Wizla <[email protected]>
  • Loading branch information
alexmachina and pwizla authored Mar 26, 2021
1 parent cd5c37e commit a1a6d50
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,7 @@ const Editor = ({ onChange, name, value }) => {
editor={ClassicEditor}
config={configuration}
data={value}
onReady={editor => editor.setData(value)}
onChange={(event, editor) => {
const data = editor.getData();
onChange({ target: { name, value: data } });
Expand Down

0 comments on commit a1a6d50

Please sign in to comment.