fix small code issues in RTE implementation

This commit is contained in:
Shawn Erquhart
2017-08-02 13:11:43 -04:00
parent 3d83325afc
commit 9c0b7262ef
11 changed files with 70 additions and 27 deletions

View File

@ -68,6 +68,11 @@ class EntryPage extends React.Component {
const { entry, newEntry, fields, collection } = nextProps;
if (entry && !entry.get('isFetching') && !entry.get('error')) {
/**
* Deserialize entry values for widgets with registered serializers before
* creating the entry draft.
*/
const values = deserializeValues(entry.get('data'), fields);
const deserializedEntry = entry.set('data', values);
this.createDraft(deserializedEntry);