Report any technical problems you discover and discuss solutions.

Including code

  • Neil Pollock
  • Auteur du sujet
  • Hors Ligne
  • Membre premium
  • Membre premium
Plus d'informations
il y a 7 ans 2 mois #5731 par Neil Pollock
Including code a été créé par Neil Pollock
Not a huge priority in terms of bugs, but still an annoyance. I need to include some HTML on a page, so tried to include it in source view as:
Code:
<code>&lt;h1&gt;Example&lt;/h1&gt;</code>

Unfortunately, when you leave the editor page then return, it converts it to actual HTML like this:
Code:
<h1> <code>Test </code> </h1>

Now, there is a workaround by adding <span> tags, but it starts to become a little verbose:
Code:
<code>&lt;<span>h1</span>&gt;Test&lt;<span>/h1</span>&gt;</code>

I suspect this is an issue with the WYSIWYG editor, but is there any way this can be fixed?

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

Plus d'informations
il y a 7 ans 2 mois #5732 par ronm
Réponse de ronm sur le sujet Including code
Hi Neil
as a workaround for now does using a textarea work for you e.g.
Code:
<p><textarea>&lt;h1&gt;Example&lt;h1&gt;</textarea> </p>
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/

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

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