The discussion revolves around overriding the buildQuote function in Discourse to add a newline before the [quote] tag. Canapin shares a working solution using a theme component with api.modifyClass to modify the composer controller, successfully adding the desired newline. asc asks if the solution still works, and Canapin confirms it does. asc later reports issues with modifyClass not firing, attributing the fix to ensuring the composerController is properly referenced via api.container.lookup. merefield links to related meta discussions about modifyClass inconsistencies, highlighting the challenges with this API.
Sorry for bumping an old topic, but is this still working for you/have you had to update it at all? I’ve been trying to get this to work and I can’t get it to fire at all, but I’ve been having a terrible time with anything at all to do with modifyClass.
Thanks @merefield and @Canapin . I’ve been trying to learn the Discourse plugin API fiddling around with what feels like they should be simple things like this but modifyClass is so inconsistent when it will/won’t work. I’ve got a little theme component (that one you were mentioned into @merefield ) where two modifyClass calls work but a third doesn’t, very frustrating trying to figure out if I’ve got something wrong or it’s just modifyClass.
Sorry for the OT on your topic and thanks for the quick reply @Canapin