For highlight.js I need to use code <pre><code> </pre></code> in tinymce area
Now it's changed to
<pre><code>pre2</code></pre>
by e107.
I already know that
<pre> and <code>
tags have exceptions and they should not be converted to HTML entities, but if you combine them, this happens
Steps to reproduce the behavior:
<code> tags, and then button for <pre> tags tag shouldn't be converted to HTML entities
latest github 2.3
PHP Version 7.2.16
Tested with simplemde plugin by lonalore that have already this script supported. Before 3 years ago it worked. Now the same result: <pre><code>test</code></pre>
@Moc change label to question, this is probably the intention. I don't need this anymore.
@Moc I believe this is the parser error we saw on e107.org. It should normally be fixed now.
It is not. I tried it after that fix. You don't see it normally because HTML entities are displayed correctly, but you can't use it for js <pre><code> test doesn't work.
But as I said, I don't need this anymore.
TinyMce also seems to be adding <br> instead of \n inside the <pre> tag.
btw.
For highlight.js I need to use code
<pre><code> </pre></code>in tinymce area
I think you mean:
<pre><code> </code></pre>
[html]<p>To create a simple test script, create a new file called <code style="unicode-bidi: embed; direction: ltr;">test.php</code> in your root folder with the following php:</p>
<pre class="prettyprint linenums">require_once("class2.php");
require_once(HEADERF);
echo "Hello World";
require_once(FOOTERF);
</pre>
<p>Then point your browser to <code style="unicode-bidi: embed; direction: ltr;">www.yoursite.com/test.php</code></p>[/html]
See: https://e107.org/developer-manual/getting-started/hello-world
@CaMer0n
try to use
/* {THEME_PREF: code=header_width&default=container} */
/* way how to use theme prefs as shortcodes in HTML layout */
Result:

<pre><span> </span><span>/* {THEME_PREF: code=header_width&default=container} */</span></pre>
<pre><span> </span><span>/* way how to use theme prefs as shortcodes in HTML layout */</span></pre>
@Jimmi08 I tried what you suggested:

TinyMce Source (before saving and after saving/re-editing):
[html]<pre class="line-numbers language-javascript">/* {THEME_PREF: code=header_width&default=container} */
/* way how to use theme prefs as shortcodes in HTML layout */</pre>[/html]
I'm not seeing an issue. Can you provide more details?
It was adding spans after inserting text, before saving itself. I had to switch to source code, insert that text there, switch back, and then use preformatted code button.
Now I can't reproduce it. I don't understand. Closing.
@Jimmi08 Maybe you copy/pasted from elsewhere? (so it pasted additional tags)
@Jimmi08 Maybe you copy/pasted from elsewhere? (so it pasted additional tags)
Visual Code editor.
I tried PSPAD before (comment above) because I use it more, but after your comment, it hit me that I was cleaning code and then I used VC.
Most helpful comment
btw.
I think you mean:
<pre><code> </code></pre>TinyMce Source:
Rendered Result:
See: https://e107.org/developer-manual/getting-started/hello-world