Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Apply changed style to TinyMCE node
  • Loading branch information
aduth committed Jun 7, 2017
commit ad06c610820c008486a1730055af2276d5ee8764
5 changes: 5 additions & 0 deletions blocks/editable/tinymce.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* External dependencies
*/
import tinymce from 'tinymce';
import { isEqual } from 'lodash';

export default class TinyMCE extends wp.element.Component {
componentDidMount() {
Expand All @@ -22,6 +23,10 @@ export default class TinyMCE extends wp.element.Component {
if ( this.editorNode.getAttribute( 'data-is-empty' ) !== isEmpty ) {
this.editorNode.setAttribute( 'data-is-empty', isEmpty );
}

if ( ! isEqual( this.props.style, nextProps.style ) ) {
Object.assign( this.editorNode.style, nextProps.style );
}
}

componentWillUnmount() {
Expand Down