Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RichText: Append registered toolbar buttons #11196

Merged
merged 1 commit into from
Oct 29, 2018

Conversation

ellatrix
Copy link
Member

@ellatrix ellatrix commented Oct 29, 2018

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
Copy link
Member

@gziolo gziolo left a comment

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
Copy link
Member

gziolo commented Oct 29, 2018

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

@gziolo
Copy link
Member

gziolo commented Oct 29, 2018

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
Copy link
Member

mtias commented Oct 30, 2018

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