The Code Fences Highlighting Buttons Plugin, created by Mazzen, adds extra code fences and syntax highlighting buttons to the Discourse composer toolbar. The plugin’s settings allow users to configure the available buttons, and options are easily extendable.
An issue with the plugin’s icons not showing in the panel was reported by AGulev, but LeoDavidson suggested a solution by adding lines to the plugin.rb file to specify the required icons. Mazzen confirmed that the issue has been fixed.
ssvenn suggested a feature enhancement, proposing that the custom button setting accept a comma-separated list to generate a dropdown menu for the button in the editor, allowing for multiple languages to be included.
The available buttons in your toolbar are configured through the plugin settings. Currently there is one javascript option and one with free to choose syntax highlighting. Options are easily extendable, just duplicate one of the two. Pull requests welcome!
Parece que el archivo plugin.rb no está especificando los iconos que necesita. Debería haber líneas como esta cerca del inicio:
register_svg_icon "nombre-del-icono" if respond_to?(:register_svg_icon)
Estas no eran necesarias en versiones anteriores de Discourse, pero ahora sí lo son.
También he descubierto que algunos nombres de iconos cambian con el tiempo, supongo que debido a cambios en el lado de Font Awesome, lo que ha hecho que algunos de mis propios iconos de plugin desaparezcan hasta que encontré los nuevos nombres para ellos.
Sería genial que la configuración del botón personalizado aceptara una lista separada por comas que generara un menú desplegable para el botón en el editor. Me encantaría tener una amplia gama de idiomas allí