Trying to remove html elements when I copy paste in Tinymce. This code below removes html from web browsers, but it doesn't work when I copy paste text from PDF files. How do I remove junk from PDF files?
<script>
tinymce.init({
plugins : 'paste',
paste_as_text: true,
paste_remove_styles_if_webkit: true,
paste_enable_default_filters : true,
paste_block_drop : false,
paste_retain_style_properties : "none",
paste_strip_class_attributes : "all",
paste_remove_spans : true,
cleanup_on_startup : true,
fix_list_elements : false,
fix_nesting : false,
fix_table_elements : false,
paste_use_dialog : true,
enter code here` paste_auto_cleanup_on_paste : true,
paste_preprocess : function(pl, o) {
// Content string containing the HTML from the clipboard
var str = o.content;
var ta = document.createElement("textarea");
ta.innerHTML = str.replace(/</g,"<").replace(/>/g,">");
o.content = CleanWordHTML(ta.value);
},
paste_postprocess : function(pl, o) {
}
});
</script>
Adobe PDF/XML Architecture - Working Samples