Pretraži podršku

Izbjegni prevare podrške. Nikad te nećemo tražiti da nas nazoveš, da nam pošalješ telefonski broj ili da podijeliš osobne podatke. Prijavi sumnjive radnje pomoću opcije „Prijavi zlouporabu”.

Saznaj više

[solved] How can I post HTML code in support.mozilla.org questions ?

  • 4 odgovora
  • 0 ima ovaj problem
  • Posljednji odgovor od cor-el

more options

Hello. How can I post HTML code snippets in support.mozilla.org questions ? All HTML code is rendered and none of the usual markdown (``` etc.) works.

Hello. How can I post HTML code snippets in support.mozilla.org questions ? All HTML code is rendered and none of the usual markdown (``` etc.) works.

Izmjenjeno od welcome

Izabrano rješenje

You can escape '<' and '>' as &lt; and &gt;. You can also enclose the HTML code within <pre><nowiki>....</nowiki></pre> tags.

Pročitaj ovaj odgovor u kontekstu 👍 1

Svi odgovori (4)

more options

Please note that any line starting with whitespace triggers preformatting (no word wrap), so it's generally more complicated to paste code here than to use a site like Pastebin.

That said, if you have a short snippet you don't mind cleaning up by hand, you can use a text editor to globally replace the opening angle brackets with the HTML entity:

Find: <

Replace with: &lt;

Korisno?

more options

Odabrano rješenje

You can escape '<' and '>' as &lt; and &gt;. You can also enclose the HTML code within <pre><nowiki>....</nowiki></pre> tags.

Korisno?

more options

Thanks to both of you for your answers!

This is not quite user-friendly for new users. Can someone ask SUMO folks, if they can add a code toolbar icon ? (Not for being lazy, but other users might not know about <nowiki>.)

Izmjenjeno od welcome

Korisno?

more options

Korisno?

Postavi pitanje

You must log in to your account to reply to posts. Please start a new question, if you do not have an account yet.