From f70b783131337d2cc164c74e045e13c421497e9f Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Thu, 4 May 2017 16:24:29 -0400 Subject: [PATCH 1/2] Use text paragraph children as heading content --- blocks/library/heading/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blocks/library/heading/index.js b/blocks/library/heading/index.js index a6796c9678fa31..0b121478265eac 100644 --- a/blocks/library/heading/index.js +++ b/blocks/library/heading/index.js @@ -42,7 +42,7 @@ registerBlock( 'core/heading', { blockType: 'core/heading', attributes: { nodeName: 'H2', - content: content[ 0 ] + content: content[ 0 ].props.children } }; const blocks = [ heading ]; From 3fd5cb09d5c882a0ea0258a3892b525a661ee930 Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Thu, 4 May 2017 16:24:46 -0400 Subject: [PATCH 2/2] Use raw format when setting TinyMCE content --- blocks/components/editable/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blocks/components/editable/index.js b/blocks/components/editable/index.js index 2bd6a232058806..165161fe0c7a8b 100644 --- a/blocks/components/editable/index.js +++ b/blocks/components/editable/index.js @@ -228,7 +228,7 @@ export default class Editable extends wp.element.Component { } content = wp.element.renderToString( content ); - this.editor.setContent( content ); + this.editor.setContent( content, { format: 'raw' } ); } getContent() {