Report any technical problems you discover and discuss solutions.

Displaying text as 'code'

Plus d'informations
il y a 8 ans 2 mois #5091 par ymoore
Displaying text as 'code' a été créé par ymoore
Hi

I'm trying to display some HTML code (as an example for others to use)in my LO but when published the code is being displayed as web content (i.e. it interprets the HTML rather than displaying as pure text). I've tried using the code format style from the text editor, and using <code> tags in the HTML view but can't get it to work. Any suggestions?

Thanks

Yvonne

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 8 ans 2 mois #5100 par ronm
Réponse de ronm sur le sujet Displaying text as 'code'
Hi Yvonne
try any of the following:
Code:
<xmp>Wrap your code between </xmp> tags. Or put your code inside <textarea></textarea> tags. Or Convert all your ‘<‘ and ‘>’ to ‘&lt’ and ‘&gt’ respectively

HTH
Ron

Xerte developer & trainer
e-learning & m-learning consultant
mitchellmedia.co.uk | xerteacademy.com | learningapps.co.uk
Note: Support here is voluntary and meant for users to support each other.
Need direct commercial support with Xerte? mitchellmedia.co.uk/contact/
Les utilisateur(s) suivant ont remercié: ymoore

Connexion ou Créer un compte pour participer à la conversation.

Modérateurs: ronmjultenJohnSmith
Temps de génération de la page : 0.258 secondes
Copyright © 2026 The Xerte Project.
Xerte logo Apereo logo OSI Logo