I am using tinymce Version: 3.3.7 and when I go to paste "as plain text" from tinymce, I still get mso tags. Is it possible to have these removed by some setting in tinyMCE or do I need to strip the tags with php?
I am not definetly sure what you want, but i guess you are trying to copy text from Word into tinymce. In order to get rid of all not wanted tags and other things like textdecoration you need to use the paste plugin. Use this settings for your init function:
plugins : "paste,...",
paste_use_dialog : false,
paste_auto_cleanup_on_paste : true,
paste_convert_headers_to_strong : false,
paste_strip_class_attributes : "all",
paste_remove_spans : true,
paste_remove_styles : true,
paste_retain_style_properties : "",
You may also use paste_preprocess
and/or paste_postprocess
setting to perform javascript action on the pasted code.
source: How to make tinymce paste in plain text by default
tinyMCE.init({
// ...
plugins : "paste",
paste_text_sticky : true,
setup : function(ed) {
ed.onInit.add(function(ed) {
ed.pasteAsPlainText = true;
});
}
// ...
});
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