Recent Topics

1 Aug 24, 2022 01:42    

Hi

I'm trying to use paste_preprocess, as I did in b2evo6.10.2 where it worked fine, but in 7.2.5 I cannot make it work. I first tried copying my code from 6.10.2. In _tinymce.plugin.php, after $init_options['autocomplete_options_url'], I insert:

		$init_options[] = 'paste_preprocess: function(pl, o) {
		o.content = Strip_tags( o.content, "<b><strong><i><em><u><p><a><img><br><blockquote>" );
			o.content += " preprocess";
		}';

but function Strip_tags() (copied from http://stackoverflow.com/questions/4122451/tinymce-paste-as-plain-text) does not work, but it worked in 6.10.2. Then I tried using 7.2.5 style:

		$init_options['paste_preprocess'] = 'function(pl, o) {
		o.content = Strip_tags( o.content, "<b><strong><i><em><u><p><a><img><br><blockquote>" );
			o.content += " preprocess";
		}';

Doesn't work either, besides normal paste does not work, and I get a console error: Uncaught TypeError: n.call is not a function.

Since paste_preprocess is a normal tinymce function, could you tell me how to use it?

Thanks


Form is loading...