I have read Tinymce strips attributes on submit, TinyMce Allow all Html tag, TinyMCE valid elements: only allow specific CSS rules, how to prevent tinymce from stripping the 'style' attribute from input element?, TinyMCE, allow data attribute and many others...
But none of them work.
This is my code:
valid_elements : '+*[*]',
cleanup: false,
inline_styles : true
I have also tried
valid_elements : '*[*]'
(without +
before *[*]
)
and even
valid_children : '+body[style]'
But when I add the styles manually like style="color: #fff;"
and submit the form, TinyMCE removes the returned output.
In other words: I want TinyMCE to stop 'removing' any code automatically.
Even now that I had manually disabled XSS filtering using:
$body = $this->input('body', FALSE);
, that was still being removed because I had enabled XSS filtering in application/config/config.php
:
$config['global_xss_filtering'] = TRUE;
But when I changed it to
$config['global_xss_filtering'] = FALSE;
the problem was resolved and I got rid of the Server Side filtering.
I post the answer here and I hope no one else be such crazy and mad that I became!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With