Skip to content

Commit

Permalink
Merge pull request #1327 from ezsystems/EZP-31120-images_not_replaced
Browse files Browse the repository at this point in the history
EZP-31120: Image is not replaced in RTE/OE when publishing directly
  • Loading branch information
lserwatka authored Apr 1, 2020
2 parents 67857b4 + ff740d1 commit a3e88a5
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,18 @@ export default class EzBtnImageUpdate extends EzEmbedImageButton {
widget.loadImagePreviewFromCurrentVersion(content.CurrentVersion._href, content.Name);

ReactDOM.unmountComponentAtNode(document.querySelector('#react-udw'));
this.fireCustomUpdateEvent();
}

/**
* Fires a custom event to reflect changes in the RichText field.
*
* @method fireCustomUpdateEvent
*/
fireCustomUpdateEvent() {
const nativeEditor = this.props.editor.get('nativeEditor');

nativeEditor.fire('customUpdate');
}

/**
Expand Down

0 comments on commit a3e88a5

Please # to comment.