Skip to content

Commit

Permalink
Paragraph Block: Fix Applying and clearing colors
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Aug 23, 2017
1 parent d354b99 commit df1b993
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions blocks/editable/tinymce.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export default class TinyMCE extends Component {
}

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

Expand Down
4 changes: 2 additions & 2 deletions blocks/library/paragraph/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,13 @@ registerBlockType( 'core/paragraph', {
<h3>{ __( 'Background Color' ) }</h3>
<ColorPalette
value={ backgroundColor }
onChange={ ( colorValue ) => setAttributes( { backgroundColor: colorValue.hex } ) }
onChange={ ( colorValue ) => setAttributes( { backgroundColor: colorValue } ) }
withTransparentOption
/>
<h3>{ __( 'Text Color' ) }</h3>
<ColorPalette
value={ textColor }
onChange={ ( colorValue ) => setAttributes( { textColor: colorValue.hex } ) }
onChange={ ( colorValue ) => setAttributes( { textColor: colorValue } ) }
/>
<h3>{ __( 'Block Alignment' ) }</h3>
<BlockAlignmentToolbar
Expand Down

0 comments on commit df1b993

Please sign in to comment.