![]() |
Summary | Composer Button Bonanza allows a site admin to define and add new markup buttons to the Composer toolbar, and provides a bonanza of new buttons in its default configuration. |
![]() |
Repository | centertap/DiscourseComposerButtonBonanza - Codeberg.org |
![]() |
Readme | DiscourseComposerButtonBonanza/README.md at main - centertap/DiscourseComposerButtonBonanza - Codeberg.org |
![]() |
Release Notes | DiscourseComposerButtonBonanza/RELEASE-NOTES.md at main - centertap/DiscourseComposerButtonBonanza - Codeberg.org |
![]() |
Install Guide | How to install a theme or theme component |
![]() |
Sponsorship | Brought to you by… ![]() This theme component is developed by the Center for Transparent Analysis and Policy, a 501(c)(3) non-profit organization. If this component is useful for your site, consider making a donation to support CTAP. |
Install Composer Button Bonanza
“Composer Affordances that You Can Afford!”
Composer Button Bonanza is a theme component which provides more markup buttons for the Composer.
Out-of-the-box, it provides a slew of new buttons, a mess of buttons, a bonanza of buttons. The default configuration adds three new buttons to the toolbar (Can you spot them? ), and hides the rest behind a toggle button in the
popup menu:
After clicking on the toggle button, the rest of the buttons become visible:
Via the theme component configuration settings, you can:
- add new button definitions (and/or remove the provided ones);
- select which buttons to show, and when to show them;
- change the ordering of buttons, and place buttons in the toolbar or the toolbar’s
pop-up menu;
- provide translations/localizations for the buttons.
This component does not define any markup or styling — it merely adds convenient buttons (affordances!) to type out existing markup that will invoke existing styles. Its primary purpose is to help your users to discover and use Composer functionality. E.g., users who use a lot of footnotes will probably just bang the ^[
and ]
directly on the keyboard; but the rest of us will be happy to have an button to remind us what to do.
A benefit of this approach is that if you decide to remove this theme component, you will not disturb the styling of any existing posts. This component is not responsible for doing any styling; it just provides shortcuts to functionality already in the Composer, and/or provided by other plugins or theme components.
Default Configuration
The default configuration provides definitions for most (all?) of the extra
markup that is available on a default Discourse installation (with all the
built-in plugins enabled, and no extra plugins installed):
- Text styles:
- underline,
strike-through - superscript and subscript
- big text, small text
- keyboard-style
- underline,
- Formatting
- Heading 1, Heading 2, Heading 3
- Footnote[1]
- Ruby text
- Image via external URL (
<img>
) - Checklist
- Highlighted, Inserted,
Deletedtext
- Symbols
- Copyright ©, Registered ®, Trademark™
- Euro €, Yen ¥
- the “shrug” kaomoji (because, why not? ¯\_(ツ)_/¯ )
- and, a toggle button to show/hide most of the above buttons
As mentioned above, these are merely the defaults. All of these buttons can
be rearranged or removed, and new ones can be added.
…like this footnote, for example. ↩︎