D
D
dioib2014-10-10 12:57:08
JavaScript
dioib, 2014-10-10 12:57:08

How to insert its own code into modx so that it is displayed on the page as code?

There is a regular code that displays snippets, chunks, etc.
Example:


It is necessary that this code be displayed on the site as a code, and not as information displayed by this code, i.e. this code should be displayed on the site as it is written in the material.
I tried a bunch of different editors, but in vain, they all process this code and display its data, but you just need text. What are the options? Here, on the toaster, this code is not processed.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
N
Nash, 2014-10-10
@mrTyler

There is no standard

<pre>
// код
</pre>

?

A
Anton, 2014-10-10
@sHinE

Replace square brackets with corresponding html entities?

Z
zooks, 2014-10-11
@zooks

How to do? Put in pre or code tags, after replacing the angle brackets with html-values
​​The question arises about the meaning of such a solution. Why dynamically generate code for display when you can insert static code.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question