Skip to content

RichText: Append registered toolbar buttons#11196

Merged
gziolo merged 1 commit into
masterfrom
try/rich-text-append-toolbar-buttons
Oct 29, 2018
Merged

RichText: Append registered toolbar buttons#11196
gziolo merged 1 commit into
masterfrom
try/rich-text-append-toolbar-buttons

Conversation

@ellatrix

@ellatrix ellatrix commented Oct 29, 2018

Copy link
Copy Markdown
Member

Description

With this branch any registered toolbar buttons will be appended to the formatting toolbar. Fixes #11114.

How has this been tested?

Register a button and see if it appears.

Screenshots

Types of changes

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.

@ellatrix ellatrix added the [Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable label Oct 29, 2018
@ellatrix ellatrix added this to the 4.2 milestone Oct 29, 2018
@ellatrix ellatrix requested a review from a team October 29, 2018 10:33

@gziolo gziolo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a good start, it isn't super flexible though.

@gziolo gziolo merged commit 96fe699 into master Oct 29, 2018
@gziolo gziolo deleted the try/rich-text-append-toolbar-buttons branch October 29, 2018 12:41
@gziolo

gziolo commented Oct 29, 2018

Copy link
Copy Markdown
Member

The issue I see is if they provide a name prop when defining ToolbarButton, it won’t render.

@gziolo

gziolo commented Oct 29, 2018

Copy link
Copy Markdown
Member

https://github.com/WordPress/gutenberg/blob/master/packages/block-library/src/button/edit.js#L84

That's another prop we need to take into account. Not sure how it should influence whether we handle keyboard shortcuts (default and custom), as well as custom toolbar controls.

@mtias

mtias commented Oct 30, 2018

Copy link
Copy Markdown
Member

Thanks @iseulde

@mtias mtias added the [Type] Task Issues or PRs that have been broken down into an individual action to take label Oct 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable [Type] Task Issues or PRs that have been broken down into an individual action to take

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Format API: where to put new toolbar buttons?

3 participants