I'm writing contents that has example HTML tags in it.
I've already tried all these attributes:
tinyMCE.init({
// ...
cleanup: false,
cleanup_on_startup: false,
verify_html: false,
extended_valid_elements : '*[*]',
});
After saving, everything is OK:
But when I reopen it, TinyMCE deletes all the HTML tags in my text:
How is the content being stored in your database?
If you want to use a code example that includes HTML, you must use HTML entities for your < and >. If you don't do this, it will be interpreted as actual HTML.
<title>Example Title</title>
Also, have you looked into TinyMCE's Code Sample plugin to show code examples? https://www.tiny.cloud/docs/plugins/opensource/codesample/