Author Topic: Rich Edit plugin help  (Read 286 times)


  • Guest
Rich Edit plugin help
« on: December 27, 2018, 08:27:08 pm »
Trying to make the rich editor (TinyMCE) plugin to automatically clean things, i would like some help to make the following code from Wordpress to work with Osclass.

Automatically Clean Up Microsoft Word HTML

Drop this code into your theme’s functions.php file. Anything you paste into TinyMCE will automatically be run through the built-in Microsoft Word HTML filtering.

Code: [Select]
* Safe Pasting for TinyMCE (automatically clean up MS Word HTML)
function tinymce_paste_options($init) {
$init['paste_auto_cleanup_on_paste'] = true;
$init['paste_convert_headers_to_strong'] = true;
return $init;
if( is_admin() ) add_filter('tiny_mce_before_init', 'tinymce_paste_options');

Any ideas welcome, thanks


  • Hero Member
  • *****
  • Posts: 763
Re: Rich Edit plugin help
« Reply #1 on: January 17, 2019, 07:06:32 pm »

I believe that parts of this code can be used in the TinyMCE javascript file (a little different situation for Osclass).


Code: [Select]
oninit : "setPlainText",
plugins : "paste"