is there any demo available for the same?
Looks like some of the recent work done to element text to add use colours in a substring of the text.
My guess is that they will extend it to do more such as add styles to substrings.
Changing the color of a text is working after enabling the markup, But how to add substring for the text
Currently not supported at the moment.
Just in case someone is stumbling on this, as I did:
The unicode font range for the numbers as subscript is U+2080 to U+2089. You can add these as a custom range in the font asset settings. These numbers are hex already so it would be from 0x2080 to 0x2089 for subscript numbers. This is not a real alternative for layouting text etc, although there is a wide range of superscript und subscript characters, but if you just need to display chemical formulars like me, it is sufficient.