From 306ec83e0886207c341b79e73baa675e0cdc043e Mon Sep 17 00:00:00 2001 From: Devin Walker Date: Sun, 8 Oct 2017 15:36:47 +0530 Subject: [PATCH 1/3] 1. Included necessary imports 2. Added description for HTML block Resolves #2831 --- blocks/library/html/index.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/blocks/library/html/index.js b/blocks/library/html/index.js index 03d2ff3f38663..0b689cd9a689f 100644 --- a/blocks/library/html/index.js +++ b/blocks/library/html/index.js @@ -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; @@ -83,6 +85,13 @@ registerBlockType( 'core/html', { onChange={ ( event ) => setAttributes( { content: event.target.value } ) } /> } + { focus && + + +

{ __( 'Add your custom HTML code and preview it right here in the editor.' ) }

+
+
+ } ); } From f4ee3daedf0fcdd14b684f0feb800cbcc1f0268f Mon Sep 17 00:00:00 2001 From: Devin Walker Date: Sun, 8 Oct 2017 15:39:03 +0530 Subject: [PATCH 2/3] Removed the word "your" #2831 --- blocks/library/html/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blocks/library/html/index.js b/blocks/library/html/index.js index 0b689cd9a689f..58f3cfedb87f6 100644 --- a/blocks/library/html/index.js +++ b/blocks/library/html/index.js @@ -88,7 +88,7 @@ registerBlockType( 'core/html', { { focus && -

{ __( 'Add your custom HTML code and preview it right here in the editor.' ) }

+

{ __( 'Add custom HTML code and preview it right here in the editor.' ) }

} From e20b9d8ed25388d6e90ca39910e10920c68e2936 Mon Sep 17 00:00:00 2001 From: Devin Walker Date: Tue, 10 Oct 2017 10:58:03 -0700 Subject: [PATCH 3/3] Added tab indentation for better code clarity #2831 --- blocks/library/html/index.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/blocks/library/html/index.js b/blocks/library/html/index.js index 58f3cfedb87f6..4394ba117f5ac 100644 --- a/blocks/library/html/index.js +++ b/blocks/library/html/index.js @@ -86,11 +86,11 @@ registerBlockType( 'core/html', { /> } { focus && - - -

{ __( 'Add custom HTML code and preview it right here in the editor.' ) }

-
-
+ + +

{ __( 'Add custom HTML code and preview it right here in the editor.' ) }

+
+
} );