POC: Another solution to support using "code" string in WYSIWYG. User can add code snippet wrapped in <pre> HTML tag. However, there is some difference in how the snippet code will be processed depending on how it was entered. If the snippet code was entered through Source Code, then all its contents will be processed and, for example, HTML tags will not be displayed in the text area. If the code is entered directly into the HTMLEDitor text field, then all internal tags will be displayed as text.
Test steps
Insert <pre class="any"><div><strong>My test</strong>code snippet</div></pre> into HTMLEditorField;
Save;
You should see <div><strong>My test</strong>code snippet</div> in HTMLEditorField;
You should see <div><strong>My test</strong>code snippet</div> on Page;
Description
POC: Another solution to support using "code" string in WYSIWYG. User can add code snippet wrapped in
<pre>
HTML tag. However, there is some difference in how the snippet code will be processed depending on how it was entered. If the snippet code was entered through Source Code, then all its contents will be processed and, for example, HTML tags will not be displayed in the text area. If the code is entered directly into the HTMLEDitor text field, then all internal tags will be displayed as text.Test steps
<pre class="any"><div><strong>My test</strong>code snippet</div></pre>
into HTMLEditorField;<div><strong>My test</strong>code snippet</div>
in HTMLEditorField;<div><strong>My test</strong>code snippet</div>
on Page;Parent issue