Supporting each other

Community forums

Welcome, Guest
Username: Password: Remember me
Report any technical problems you discover and discuss solutions.
  • Page:
  • 1

TOPIC:

Displaying text as 'code' 6 years 6 months ago #5091

  • ymoore
  • ymoore's Avatar Topic Author
  • Offline
  • Administrator
  • Administrator
  • Posts: 96
  • Thank you received: 14
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

Please Log in or Create an account to join the conversation.

Displaying text as 'code' 6 years 6 months ago #5100

  • ronm
  • ronm's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 852
  • Thank you received: 261
Hi Yvonne
try any of the following:
<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/
The following user(s) said Thank You: ymoore

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Moderators: ronmjultenJohnSmith
Time to create page: 0.108 seconds
Copyright © 2024 The Xerte Project.
Xerte logo Apereo logo OSI Logo

Search