diff --git a/blocks/components/editable/index.js b/blocks/components/editable/index.js index 305f3b358f5459..2bd6a232058806 100644 --- a/blocks/components/editable/index.js +++ b/blocks/components/editable/index.js @@ -320,7 +320,16 @@ export default class Editable extends wp.element.Component { } render() { - const { tagName, style, value, focus, className, showAlignments = false, formattingControls } = this.props; + const { + tagName, + style, + value, + focus, + className, + showAlignments = false, + inline, + formattingControls + } = this.props; const classes = classnames( 'blocks-editable', className ); // Generating a key that includes `tagName` ensures that if the tag @@ -335,6 +344,9 @@ export default class Editable extends wp.element.Component { style={ style } className={ classes } defaultValue={ value } + settings={ { + forced_root_block: inline ? false : 'p' + } } key={ key } /> ); diff --git a/blocks/components/editable/style.scss b/blocks/components/editable/style.scss index 6447e96c0b1d9e..1e6c8f6dd8ba50 100644 --- a/blocks/components/editable/style.scss +++ b/blocks/components/editable/style.scss @@ -26,10 +26,7 @@ figcaption.blocks-editable { margin-top: 0.5em; color: $dark-gray-100; text-align: center; - - p { - font-size: $default-font-size; - } + font-size: $default-font-size; } diff --git a/blocks/components/editable/tinymce.js b/blocks/components/editable/tinymce.js index 30d17227613ba1..e50e0b72f75e4d 100644 --- a/blocks/components/editable/tinymce.js +++ b/blocks/components/editable/tinymce.js @@ -21,6 +21,8 @@ export default class TinyMCE extends wp.element.Component { } initialize() { + const { settings, focus } = this.props; + tinymce.init( { target: this.editorNode, theme: false, @@ -35,10 +37,11 @@ export default class TinyMCE extends wp.element.Component { }, formats: { strikethrough: { inline: 'del' } - } + }, + ...settings } ); - if ( this.props.focus ) { + if ( focus ) { this.editorNode.focus(); } } diff --git a/blocks/library/button/index.js b/blocks/library/button/index.js index 81917d246c88cd..0dc22cc14938e7 100644 --- a/blocks/library/button/index.js +++ b/blocks/library/button/index.js @@ -74,6 +74,7 @@ registerBlock( 'core/button', { value={ text } onFocus={ setFocus } onChange={ ( value ) => setAttributes( { text: value } ) } + inline /> { focus &&
setAttributes( { caption: value } ) } /> + onChange={ ( value ) => setAttributes( { caption: value } ) } + inline + /> ) : null } ); diff --git a/blocks/library/heading/index.js b/blocks/library/heading/index.js index 7be5a8157cd851..a6796c9678fa31 100644 --- a/blocks/library/heading/index.js +++ b/blocks/library/heading/index.js @@ -104,6 +104,7 @@ registerBlock( 'core/heading', { onFocus={ setFocus } onChange={ ( value ) => setAttributes( { content: value } ) } onMerge={ mergeWithPrevious } + inline /> ); }, diff --git a/blocks/library/image/index.js b/blocks/library/image/index.js index e8bdb9e4a276f8..c7e26f0e237dfa 100644 --- a/blocks/library/image/index.js +++ b/blocks/library/image/index.js @@ -101,7 +101,9 @@ registerBlock( 'core/image', { value={ caption } focus={ focus } onFocus={ setFocus } - onChange={ ( value ) => setAttributes( { caption: value } ) } /> + onChange={ ( value ) => setAttributes( { caption: value } ) } + inline + /> ) : null } ); diff --git a/blocks/library/quote/index.js b/blocks/library/quote/index.js index 6c1cf716bd41ff..e983c5af3a791c 100644 --- a/blocks/library/quote/index.js +++ b/blocks/library/quote/index.js @@ -121,18 +121,18 @@ registerBlock( 'core/quote', { showAlignments /> { ( citation || !! focus ) && ( - + setAttributes( { + citation: nextCitation + } ) + } + focus={ focusedEditable === 'citation' ? focus : null } + onFocus={ () => setFocus( { editable: 'citation' } ) } + inline + /> ) } ); diff --git a/post-content.js b/post-content.js index 642824028297c1..e55d831dc6bbb8 100644 --- a/post-content.js +++ b/post-content.js @@ -74,7 +74,7 @@ window._wpGutenbergPost = { '', '', - '

The editor will endeavour to create a new page and post building experience that makes writing rich posts effortless, and has “blocks” to make it easy what today might take shortcodes, custom HTML, or “mystery meat” embed discovery.

Matt Mullenweg, 2017

', + '

The editor will endeavour to create a new page and post building experience that makes writing rich posts effortless, and has “blocks” to make it easy what today might take shortcodes, custom HTML, or “mystery meat” embed discovery.

Matt Mullenweg, 2017
', '', '', @@ -86,7 +86,7 @@ window._wpGutenbergPost = { '', '', - '

There is no greater agony than bearing an untold story inside you.

Maya Angelou

', + '

There is no greater agony than bearing an untold story inside you.

Maya Angelou
', '', '',