Añadiendo un menú desplegable a la barra de herramientas

  1. Yep it’s doable in a theme. See how it’s done here:

https://github.com/discourse/discourse/blob/master/plugins/poll/assets/javascripts/initializers/add-poll-ui-builder.js.es6#L24-L31

  1. You can specify which of the three groups of buttons you want to your button to belong to. It seems your button is showing up in the middle because the code you used sets the button’s group to ‘insertions’, which is the middle group. So if you want your button to be on the right hand side of the toolbar, you’ll need to set the button’s group to ‘extras’. See the list of group names here:

https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/components/d-editor.js.es6#L52-L56