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

Set order for new rich text button #13528

Closed
m-radzikowski opened this issue Jan 26, 2019 · 3 comments
Closed

Set order for new rich text button #13528

m-radzikowski opened this issue Jan 26, 2019 · 3 comments
Labels
[Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable [Type] Enhancement A suggestion for improvement.

Comments

@m-radzikowski
Copy link

Is your feature request related to a problem? Please describe.
When adding new button to rich text editor, it is put always at the end. In the order of addition. This would allow to add button in any place on the toolbar.
Currently I'm unable to add a new button between "italic" and "link" buttons.

Describe the solution you'd like
New property for RichTextToolbarButton / ToolbarButton that would allow to set ordinal number for button, or "weight".

@swissspidy swissspidy added [Type] Enhancement A suggestion for improvement. [Package] Rich text /packages/rich-text labels Jan 26, 2019
@ellatrix ellatrix changed the title Set order / weight for new button Set order for new rich text button Jan 29, 2019
@ellatrix ellatrix added [Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable and removed [Package] Rich text /packages/rich-text labels Jan 29, 2019
@ellatrix ellatrix modified the milestone: Future Jan 29, 2019
@azaozz
Copy link
Contributor

azaozz commented Jan 31, 2019

Ran into this too. It is a pretty minor issue but still "nice to fix" eventually :)

Seems easier/most straightforward thing would be to have a filterable array of the buttons names (core/bold, core/link, etc.) that can be sorted independently of loading order (similarly to how the PHP filter mce_buttons works for the Classic editor). Then the same approach can be used in other sortable/re-orderable places like in the inspector, plugins added menu items, etc.

@ellatrix
Copy link
Member

ellatrix commented Apr 4, 2019

This is sort of fixed with #14233: added controls are now listed alphabetically in the dropdown.

@ellatrix ellatrix closed this as completed Apr 4, 2019
@grillonbleu
Copy link

Could this suggestion be reconsidered? Rich text buttons are changing position depending on the locale. It would make more sense to order by importance. Furthermore, related buttons end up shuffled among existing ones.

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] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

5 participants