Repository navigation
Conversation
| At the core of rich text formatting in Gutenberg lies the `Editable` component. It's a wrapper and controller around the TinyMCE library, and can be used by any block to power any rich text editing features. It us used for captions under images or embeds, for the separate fields in a quote, etc. | ||
|
|
||
| <ul> | ||
| <li><strong>Type:</strong> <code>Function</code></li> |
There was a problem hiding this comment.
Technically a function, but more specifically a Component class.
| } | ||
|
|
||
| return el( | ||
| <Editable, |
| placeholder={ __( 'Write caption…' ) } | ||
| value={ caption } | ||
| focus={ focus && focus.editable === 'caption' ? focus : undefined } | ||
| onFocus={ focusCaption } |
|
|
||
| ## Editable | ||
|
|
||
| At the core of rich text formatting in Gutenberg lies the `Editable` component. It's a wrapper and controller around the TinyMCE library, and can be used by any block to power any rich text editing features. It us used for captions under images or embeds, for the separate fields in a quote, etc. |
There was a problem hiding this comment.
Typo, It is used for captions rather than It us used for captions
|
|
||
| In order to make it easier to create sophisticated blocks quickly, reducing the amount of work you have to do to develop common functionality, several components have been created which can be accessed through the `wp.components` global. This section covers the available UI components. | ||
|
|
||
| ## Placeholder |
There was a problem hiding this comment.
Just an idea, should we maybe keep the component related docs in their own README files and only cross-link them in here with a very brief description?
There was a problem hiding this comment.
I'd prefer to have them here as this will easier to navigate and refer to.
There was a problem hiding this comment.
A middle-ground could be to create a separate page for each component using its README
|
@mtias is it still relevant? |
|
@gziolo it'd be nice to generate these from each component's readme. Otherwise it'd be hard to maintain. |
|
Right, it makes a lot of sense what you proposed. I'm closing this one, will open an issue if we don't have one. |
|
We can reuse some of the copy here and just start PRs for each component. |
Work in progress: document the tools and components we have for creating blocks.