From 81a7da47f7b17c6502d6173f3c2898f1b69254df Mon Sep 17 00:00:00 2001 From: Kelin Chauhan Date: Mon, 11 Mar 2019 15:47:38 +0530 Subject: [PATCH 1/4] Add reference link for dynamic blocks --- docs/designers-developers/developers/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/designers-developers/developers/README.md b/docs/designers-developers/developers/README.md index 162c45fbcfa4eb..ec19e12703bac9 100644 --- a/docs/designers-developers/developers/README.md +++ b/docs/designers-developers/developers/README.md @@ -4,7 +4,7 @@ The new editor is highly flexible, like most of WordPress. You can build custom ## Creating Blocks -The editor is about blocks, and the main extensibility API is the Block API. It allows you to create your own static blocks, dynamic blocks rendered on the server and also blocks capable of saving data to Post Meta for more structured content. +The editor is about blocks, and the main extensibility API is the Block API. It allows you to create your own static blocks, [Dynamic Blocks](/docs/designers-developers/developers/tutorials/block-tutorial/creating-dynamic-blocks.md) ( rendered on the server ) and also blocks capable of saving data to Post Meta for more structured content. If you want to learn more about block creation, the [Blocks Tutorial](/docs/designers-developers/developers/tutorials/block-tutorial/readme.md) is the best place to start. From e7b5e78c187a191b3fd17b4ba8fdaefb1f35b440 Mon Sep 17 00:00:00 2001 From: Kelin Chauhan Date: Mon, 11 Mar 2019 15:53:36 +0530 Subject: [PATCH 2/4] Fix grammar mistake in docs --- .../block-tutorial/block-controls-toolbars-and-inspector.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/designers-developers/developers/tutorials/block-tutorial/block-controls-toolbars-and-inspector.md b/docs/designers-developers/developers/tutorials/block-tutorial/block-controls-toolbars-and-inspector.md index 1bad64b3d95329..b2efe54ef4d1ac 100644 --- a/docs/designers-developers/developers/tutorials/block-tutorial/block-controls-toolbars-and-inspector.md +++ b/docs/designers-developers/developers/tutorials/block-tutorial/block-controls-toolbars-and-inspector.md @@ -6,7 +6,7 @@ To simplify block customization and ensure a consistent experience for users, th ![Screenshot of the rich text toolbar applied to a paragraph block inside the block editor](https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/designers-developers/assets/toolbar-text.png) -When the user selects a block, a number of control buttons may be shown in a toolbar above the selected block. Some of these block-level controls are included automatically if the editor is able to transform the block to another type, or if the focused element is an RichText component. +When the user selects a block, a number of control buttons may be shown in a toolbar above the selected block. Some of these block-level controls are included automatically if the editor is able to transform the block to another type, or if the focused element is a RichText component. You can also customize the toolbar to include controls specific to your block type. If the return value of your block type's `edit` function includes a `BlockControls` element, those controls will be shown in the selected block's toolbar. From 0198d953a23c4b776630b6c84f008c4bec11b4b0 Mon Sep 17 00:00:00 2001 From: Kelin Chauhan Date: Mon, 11 Mar 2019 15:56:20 +0530 Subject: [PATCH 3/4] Add info as to convey what changes user should expect --- .../tutorials/block-tutorial/writing-your-first-block-type.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/designers-developers/developers/tutorials/block-tutorial/writing-your-first-block-type.md b/docs/designers-developers/developers/tutorials/block-tutorial/writing-your-first-block-type.md index ea9a18bbf23684..3dfb4645fcc3d6 100644 --- a/docs/designers-developers/developers/tutorials/block-tutorial/writing-your-first-block-type.md +++ b/docs/designers-developers/developers/tutorials/block-tutorial/writing-your-first-block-type.md @@ -82,6 +82,8 @@ registerBlockType( 'gutenberg-boilerplate-esnext/hello-world-step-01', { ``` {% end %} +_By now you should be able to see `Hello editor` in the admin side and `Hello saved content` on the frontend side._ + Once a block is registered, you should immediately see that it becomes available as an option in the editor inserter dialog, using values from `title`, `icon`, and `category` to organize its display. You can choose an icon from any included in the built-in [Dashicons icon set](https://developer.wordpress.org/resource/dashicons/), or provide a [custom svg element](/docs/designers-developers/developers/block-api/block-registration.md#icon-optional). A block name must be prefixed with a namespace specific to your plugin. This helps prevent conflicts when more than one plugin registers a block with the same name. From 4b1987a03ea70e503013de1c526d046fec2c59f7 Mon Sep 17 00:00:00 2001 From: Kelin Chauhan Date: Mon, 11 Mar 2019 16:00:13 +0530 Subject: [PATCH 4/4] Improve sentence formation and fix grammar mistakes in docs --- docs/designers-developers/key-concepts.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/designers-developers/key-concepts.md b/docs/designers-developers/key-concepts.md index e42f5aa044ba1a..7a3f18526b03ba 100644 --- a/docs/designers-developers/key-concepts.md +++ b/docs/designers-developers/key-concepts.md @@ -109,7 +109,7 @@ Thus, the serialization process converts the tree into HTML using HTML comments This is one end of the process. The other is how to recreate the internal data tree of the collection of blocks whenever a post is to be edited again. A formal grammar defines how the serialized representation of a Gutenberg post should be loaded just as some basic rules define how to turn the tree into an HTML-like string. Gutenberg posts aren't designed to be edited by hand; they aren't designed to be edited as HTML documents because Gutenberg posts aren't HTML in essence. -They just happen, incidentally, to be stored inside of `post_content` in a way in which they require no transformation in order to be viewable by any legacy system. It's true that loading the stored HTML into a browser without the corresponding machinery that the experience might degrade if it included dynamic blocks of content: dynamic elements may not load, server-generated content may not appear, interactive content may remain static. However, it at least protects against viewing Gutenberg posts on themes and installations which are Gutenberg-unaware, and provides the most accessible way to the content. +They just happen, incidentally, to be stored inside of `post_content` in a way in which they require no transformation in order to be viewable by any legacy system. It's true that loading the stored HTML into a browser without the corresponding machinery might degrade the experience, also if it included dynamic blocks of content: dynamic elements may not load, server-generated content may not appear, interactive content may remain static. However, it at least protects against not being able to view Gutenberg posts on themes and installations which are Gutenberg-unaware, and provides the most accessible way to the content. In other words the post remains mostly intact even if the Gutenberg is not supported on the installation. ## Delimiters and Parsing Expression Grammar