Alter mceInit for visual editor on topics
-
Wordpress 3.6.1, bbPress 2.4, Buddypress1.8.1 Site is http://www.thedoctorwhoforum.com
I’m using the visual TinyMCE editor on my bbPress Forum pages and also on my normal WordPress blog pages.
Some users have issues with spans and other code being copied in when they paste. I have been able to stop the pasting issue on the blog comments with the following code which added the paste plugin to TinyMCE:
function myformatTinyMCE($in) { $in['plugins'] = 'inlinepopups, paste, wordpress, wplink, wpdialogs'; $in['paste_text_sticky'] = true; $in['paste_text_sticky_default'] = true; return $in; } add_filter('tiny_mce_before_init', 'myformatTinyMCE' );
However, it doesn’t affect TinyMCE on the Forums. They seem to be separate. I instigated the visual editor on the bbPress topics with the following code:
function bbp_enable_visual_editor($in) { $in['tinymce'] = true; return $in; } add_filter( 'bbp_after_get_the_content_parse_args', 'bbp_enable_visual_editor');
I’ve tried lots of different things, but I can’t seem to affect the bbPress TinyMCE the same way I can the blog TinyMCE.
For example, this didn’t work:
function bbp_enable_visual_editor($in) { $in['tinymce'] = true; $in['plugins'] = 'inlinepopups, paste, wordpress, wplink, wpdialogs, tabfocus'; $in['paste_text_sticky'] = true; $in['paste_text_sticky_default'] = true; return $in; } add_filter( 'bbp_after_get_the_content_parse_args', 'bbp_enable_visual_editor');
Anybody any ideas how to add paste to the plugins and possibly add paste_text_sticky etc as well? I’m a bit new at this.
Thanks.
- You must be logged in to reply to this topic.