1

My stellar.toml file is active, and I am wondering if I can format the strings with some HTML so they display better on sites like stellar.export or stellarport.io.

My description of the asset is kind of long, and I would love to format it to include line breaks. I would also like to include a clickable link.

I've tried adding
and \n for the new line, but that doesn't seem to do anything.

As for the links, I included the https:// but that did not make it clickable.

If anyone has any ideas please let me know!

I created a test token for this and if I find an answer I will apply it here: https://stellar.expert/explorer/public/asset/testSPRKL1-GAOEL3W3NK7ENA6II5472ZF6Q3MKHVBOH4GK4W3NXTCH7ULJTJOSPRKL

3

The stellar.toml spec lists the currency description as a string, with no mention of HTML. Clients rendering it will thus treat it as a plain string, so any HTML you include there will not be rendered as you intend.

  • What about the fact that toml files allow for multi-line strings? Would this mean it is up to the clients to choose to render the new lines or are they somehow prevented from doing that by the Stellar specs? – glaemart Apr 11 at 17:09
  • The entirety of the spec for the description is Description of token and what it represents so I'd presume it's up to the clients to respect the TOML spec there. – Carl Vitullo Apr 11 at 17:13
  • 1
    Toml allows multi line and supports \n, but a line break is handled like a white space in html and it's up to the website to convert that to a html <br> or not. – sui Apr 11 at 23:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.