Skip to content

Commit

Permalink
Add block description for Custom HTML block
Browse files Browse the repository at this point in the history
  • Loading branch information
westonruter committed Jul 1, 2017
1 parent 7804758 commit e129e78
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 'element';
import './style.scss';
import { registerBlockType, query } from '../../api';
import BlockControls from '../../block-controls';
import InspectorControls from '../../inspector-controls';
import BlockDescription from '../../block-description';

const { html } = query;

Expand Down Expand Up @@ -71,6 +73,13 @@ registerBlockType( 'core/html', {
</ul>
</BlockControls>
}
{ focus &&
<InspectorControls key="inspector">
<BlockDescription>
<p>{ __( 'Arbitrary HTML code.' ) }</p>
</BlockDescription>
</InspectorControls>
}
{ preview
? <div dangerouslySetInnerHTML={ { __html: attributes.content } } />
: <TextareaAutosize
Expand Down

0 comments on commit e129e78

Please sign in to comment.