@r-a-y thanks for this plugin it has been a life saver! I enabled tinymce type code in bbpress by writing a very basic plugin based on code from the bbpress forums. This allowed my non-admin users to use formatting such as red text, etc in their posts.
When an admin creates a post, the preview shows the HTML formatting. When a non-admin tries it, things like bold, italic, underline will show, but any apostrophes show a slash before hand, and no colours carry over.
I am guessing this is some kind of security thing? If there is a way to have non admins access this it would be great.
As an aside, here is the code from the plugin (I am not a dev at all, so perhaps this is relevant or not at all):
`<?php
/*
Plugin Name: Easyily Enable TinyMCE for bbpress
Plugin URI: http://cloudmasterstudios.com/plugins/
Description: a plugin to easily enable TinyMCE in bbpress
Version: 1.0
Author: Rodolfo Martinez
Author URI: http://cloudmasterstudios.com
License: GPL2
*/
/* Copyright 2017 Rodolfo Martinez (email : [email protected])
Easily Enable TinyMCE for bbpress is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
any later version.
Easily Enable TinyMCE for bbpress is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Easily Enable TinyMCE for bbpress. If not, see https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html.
*/
add_filter( 'bbp_kses_allowed_tags', 'ntwb_bbpress_custom_kses_allowed_tags' );
function ntwb_bbpress_custom_kses_allowed_tags() {
return array(
// Links
'a' => array(
'class' => true,
'href' => true,
'title' => true,
'rel' => true,
'class' => true,
'target' => true,
),
// Quotes
'blockquote' => array(
'cite' => true,
),
// Div
'div' => array(
'class' => true,
),
// Span
'span' => array(
'class' => true,
'style' => true,
),
// Paragraph
'p' => array(
'class' => true,
'style' => true,
),
// Code
'code' => array(),
'pre' => array(
'class' => true,
),
// Formatting
'em' => array(),
'strong' => array(),
'del' => array(
'datetime' => true,
),
// Lists
'ul' => array(),
'ol' => array(
'start' => true,
),
'li' => array(),
// Images
'img' => array(
'class' => true,
'src' => true,
'border' => true,
'alt' => true,
'height' => true,
'width' => true,
),
// Tables
'table' => array(
'align' => true,
'bgcolor' => true,
'border' => true,
),
'tbody' => array(
'align' => true,
'valign' => true,
),
'td' => array(
'align' => true,
'valign' => true,
),
'tfoot' => array(
'align' => true,
'valign' => true,
),
'th' => array(
'align' => true,
'valign' => true,
),
'thead' => array(
'align' => true,
'valign' => true,
),
'tr' => array(
'align' => true,
'valign' => true,
)
);
}
?>`