Wysiwyg
Last updated: Mar 04, 2024

Introduction

When added a Wysiwyg (What You See Is What You Get) element in the section, 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:

<?=$your_elementname;?>

 

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">
1