Honestly, I have no idea where to post this so feel free to move it if this isn’t the right category.
Recently I’ve been interested in improving the user experience in Discourse for adding
ruby tags for text in the post editor. For those that don’t know, this tag can be used when writing Japanese text to convey the “reading” along with the text, such as changing 日本語 to 日本語. However, many people even in our Japanese learning community don’t know this exists or don’t bother using it because it can be tedious writing it out for long phrases or sentences. (That one word example was generated from
For that reason, I want to add an option in the post editor menu to act very similarly to the hyperlink option. It would still have two inputs, but they would be used to separate the main text and the reading instead of the link name and URL. It wouldn’t interact with the server at all since it would just insert vanilla (Discourse-supported) HTML into the editor. It’s likely that I’d want to do a little bit of text parsing to allow users to write long strings of text and add the ruby tags all at once instead of having to do it one character at a time.
So to the question, would this best be done as a theme component, a plugin, or something else entirely? Also, would there be a way to do this where I wouldn’t have to worry about the component/plugin/whatever breaking when core Discourse changes something about the editor? I’m pretty sure the Discourse install I’d want to get this added to is hosted by Discourse, so it would have to be compatible with that type of installation. I still have to check with the admins of that site, but I don’t think I’ll have any issue getting them to install it once it’s ready (and obviously I’ll check with them first after I get advice from here).
Any help and advice would be appreciated!