Skip to content

Commit

Permalink
1. Included necessary imports
Browse files Browse the repository at this point in the history
2. Added description for HTML block

Resolves WordPress#2831
  • Loading branch information
DevinWalker committed Oct 8, 2017
1 parent 27cd1f5 commit 306ec83
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions blocks/library/html/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import { Component } from '@wordpress/element';
import './editor.scss';
import { registerBlockType, source } from '../../api';
import BlockControls from '../../block-controls';
import InspectorControls from '../../inspector-controls';
import BlockDescription from '../../block-description';

const { html } = source;

Expand Down Expand Up @@ -83,6 +85,13 @@ registerBlockType( 'core/html', {
onChange={ ( event ) => setAttributes( { content: event.target.value } ) }
/>
}
{ focus &&
<InspectorControls key="inspector">
<BlockDescription>
<p>{ __( 'Add your custom HTML code and preview it right here in the editor.' ) }</p>
</BlockDescription>
</InspectorControls>
}
</div>
);
}
Expand Down

0 comments on commit 306ec83

Please sign in to comment.