Support RTL blocks for LTR-layout website and vice versa

I’ve wanted to figure out how to work with the new text rendering setup for a while now, so I made a plugin that adds bbcode tags for text-direction. It lets you use the tags [text-direction=rtl][/text-direction] for rtl text and [text-direction=ltr][/text-direction] for ltr text.

I have only tested this lightly on my local setup, so if you use it and run into any problems, let me know. Note: this plugin will only work on the latest version of Discourse, where text rendering is using ES6 modules. If you are using an older version of Discourse, it wouldn’t be much work to convert the plugin to work for that.

Check it out here:
https://github.com/scossar/discourse-text-direction

2 лайка