r-a-y / bbp-live-preview Goto Github PK
View Code? Open in Web Editor NEWPreview your bbPress forum posts before posting.
Preview your bbPress forum posts before posting.
Hello @r-a-y
Thanks for the good plugin. Do you plan to publish it on Wordpress.org? It will allow us to get auto updates.
The preview ramdomly update itself when editing the textarea
The refresh time seams to be long...
Hi @r-a-y
Here, on github.com, there is the handy switcher between the 'Write' and 'Preview' modes. Don't you plan to apply the same tabs in your plugin? Sometimes it's handier to switch to preview rather than having the ajax loader beneath the textarea.
Thanks.
it does not work now, please update.
BTW, is there a setting page at backend?
Alex
@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,
)
);
}
?>`
Hi @r-a-y
Seems that the autoembeds functionality doesn't work with the latest version of BuddyPress. I tried with bbPress 2.5.12 and 2.6.beta-2
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.