Last updated: Dec 04, 2023


When added a Wysiwyg (What You See Is What You Get) element in the partial, the user is provided with a nice text editor.

This editor can be used to format text in a way a normal text or textarea can't. For example text can be made bold, italic, etc. The text can also contain links, tables, lists and so on.

The editor used to to this is the tinyMCE editor.

Displaying the output

Displaying the output of a WYSIWYG element is the same as a text or textarea.

You can simply use this example to show the output of the WYSIWYG element:



Using code highlighting

If you wish to use the code highlighting in the WYSIWYG editor, be sure to include the prism JS en CSS files in your layout.

Include this in the HEAD section of your layout file.

<script src="/assets/vendors/prism/prism.js"></script>
<link rel="stylesheet" href="/assets/vendors/prism/prism.css">