fix(markdown): list editor components alphabetically in toolbar#7759
Merged
martinjagodic merged 3 commits intodecaporg:mainfrom Mar 23, 2026
Merged
fix(markdown): list editor components alphabetically in toolbar#7759martinjagodic merged 3 commits intodecaporg:mainfrom
martinjagodic merged 3 commits intodecaporg:mainfrom
Conversation
As editor components are registered in an unpredictable order and stored in an unordered map, ensure the dropdown menu lists widgets in a more human-friendly order at display-time.
0ff19fc to
96d05c9
Compare
martinjagodic
requested changes
Mar 20, 2026
Member
martinjagodic
left a comment
There was a problem hiding this comment.
Thanks for the submission. This helps, but I would not override the order if editor_components is set.
With your PR, in this widget:
{ label: 'Body', name: 'body', editor_components: ['youtube', 'image'], widget: 'markdown' }
The order is Image, Youtube, but I would like to see it as defined: Youtube, Image
When the Markdown widget has a defined list of editor components, they will now be displayed in the same order as configured - making the order fully user-controlled. Only when the editor component list is missing will the default components be listed alphabetically.
Contributor
Author
Thanks @martinjagodic, good point. I've made that change to the PR, preferring the |
martinjagodic
approved these changes
Mar 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The list of editor components in the Markdown widget's dropdown menu is in an unpredictable order. As the list of components on our site has grown quite long, it's become increasingly difficult to find what you're looking for.
Editor components are registered in an unpredictable order and then stored in an unordered map, so this changes the toolbar to display components in a human-friendly alphabetical order.
Test plan
Open the demo site, Posts collection, check the + list of components on the post body.
Previously:
Now:
Checklist
Please add a
xinside each checkbox:A picture of a cute animal (not mandatory but encouraged)