Noticing what I think is a bug, I am now wondering if it is possible to customize how html is parsed when pasted into the composer.
Our forum is dedicated to a site with ancient scriptures in translation with root languages. (E.g. English with Pāḷi) So people can be pasting something like this:
<span lang="en">So I have heard.</span><span lang="pli"><span lang="la">Evaṁ me sutaṁ—</span></span><span lang="en">At one time the Buddha was staying near Sāvatthī in Jeta’s Grove, Anāthapiṇḍika’s monastery.</span><span lang="pli"><span lang="la">ekaṁ samayaṁ bhagavā sāvatthiyaṁ viharati jetavane anāthapiṇḍikassa ārāme.</span></span>
On the scripture website, it looks like this:
Prior to the new bug I mentioned above, pasting that text would produce this on our forum:
So I have heard. Evaṁ me sutaṁ— At one time the Buddha was staying near Sāvatthī in Jeta’s Grove, Anāthapiṇḍika’s monastery. ekaṁ samayaṁ bhagavā sāvatthiyaṁ viharati jetavane anāthapiṇḍikassa ārāme.
Not ideal! All the languages running together. Hard to read. A conscientious poster would format using markdown like this:
So I have heard.
*Evaṁ me sutaṁ—*
At one time the Buddha was staying near Sāvatthī in Jeta’s Grove, Anāthapiṇḍika’s monastery.
*ekaṁ samayaṁ bhagavā sāvatthiyaṁ viharati jetavane anāthapiṇḍikassa ārāme.*
Which would render like this:
Basically putting each span on a line, making spans with lang="pli" italic with a blank like after.
Until I saw the bug I mentioned at the top of this post, I hadn’t thought about the fact that there is already a process to convert some html into Markdown. Now I’m wondering if it is possible using either a component or a plugin to add some code that would convert the specific spans with lang props in the way I mention above. Ideally through a component, but possibly with a plugin.
