winterheat
Member
Posted 1 year ago #
I simply have the following lines in the HTML mode inside Edit Post:
<code>
ls # list folder content
ls -l # list in detail format
</code>
and it looks like the above when I come back to Edit in HTML mode. However, when the blog is displayed, I see that all sorts of tags such as br tag <br> and sometimes even the paragraph tag <p> are added to the simple HTML above.
So HTML is not the true HTML? It is still modified?
What is a way to view and edit the RAW HTML?
Use code for inline code:
This is a code example: <code>foobar</code>
and use PRE for those blocks:
<pre>
This is more code
this is too
</pre>
I ended up using a plugin (TinyMCE Advanced) that stops the majority of <p>
tags being added when switching between html and visual modes
Planky, don't switch between modes. That way lies madness.
winterheat
Member
Posted 1 year ago #
ah, ok, i learned also that also a right way is to do:
<pre><code>
ls # list content
ls -l # iist using detail format
</code></pre>
the <code> makes it semantic correctly as "computer code"... for the search engine to know they are computer code.