Ok, so I have been looking into this for a while now but from I can gather there is currently no option in TinyMCE to disable certain characters from being converted to entities.
I can understand the reason behind this, valid HTML is always nice, however, I really need a way to stop this, I have an email template editor where the client can edit there email templates and insert certain template variables (i.e. Account::first()->first_name which grabs the first name of the customer).
TinyMCE is converting ->
to ->
Is there anyway I can prevent this on the TinyMCE side of things?
>
in it; TinyMCE is not changing anything, it is giving you the HTML as it is represented in the DOM. You want to transform it additionally into something else. – Amadan>
, but it would be catastrophic with<
:<p> foo < bar </p>
ends up as non-parsable<p> foo < bar </p>
. What do you propose to happen? And if you know that you only write plaintext, you could just strip tags and convert to text (actually, extremely easily -$('<div/>').html(tinyMCE.activeEditor.getContent()).text()
or slightly longer plainJS equivalent - but then why use TinyMCE and nottextarea
? – Amadan