Skip to:

Paragraph tag after TinyMCE

  • I have successfully integrated TinyMCE to my editor in bbpress, which I found that is so easy.

    However, when doing the submit, TinyMCE submits the HTML code on behind to bbpress. I found that each line TinyMCE created a <p>…</p> tags, but bbpress is not allowing this. Finally, <p></p> comes to the screen when viewing the post.

    Is there any workaround for this?

Viewing 9 replies - 1 through 9 (of 9 total)
  • I found that it is as simple as to add the <p> tag to the allowed tags

    how you did this?

    I made use of a plugin to add tags

    function allow_more_tags( $tags ) {

    $tags = array(‘style’ => array());

    $tags = array(‘style’ => array());

    return $tags;


    add_filter( ‘bb_allowed_tags’, ‘allow_more_tags’ );



    How I can use it?

    Where I have to insert it?

    Thx !



    I have my answer :

    file : bb-include>template-fonction.php

    search : “bb_allowed_tag”

    Include :

    // Add Tags with allow_tags
    <p> function allow_more_tags( $tags ) {<br />
    $tags['p'] = array('style' => array());<br />
    $tags['span'] = array('style' => array());<br />
    $tags['b'] = array('style' => array());<br />
    $tags['em'] = array('style' => array());<br />
    $tags['ol'] = array('style' => array());</p>
    <p> return $tags;<br />
    <p> add_filter( 'bb_allowed_tags', 'allow_more_tags' );

    under this…

    // format=list or array( 'format' => 'list' )<br />
    function get_allowed_markup( $args = '' ) {<br />
    $args = wp_parse_args( $args, array('format' => 'flat') );<br />
    extract($args, EXTR_SKIP);</p>
    <p> $tags = bb_allowed_tags();<br />
    unset($tags['pre'], $tags['br']);<br />
    $tags = array_keys($tags);</p>
    <p> switch ( $format ) :<br />
    case 'array' :<br />
    $r = $tags;<br />
    break;<br />
    case 'list' :<br />
    $r = "<ul class='allowed-markup'>nt
    <li>";<br />
    $r .= join("</li>
    <li>", $tags);<br />
    $r .= "</li>
    nn";<br />
    break;<br />
    default :<br />
    $r = join(' ', $tags);<br />
    break;<br />
    endswitch;<br />
    return apply_filters( 'get_allowed_markup', $r, $format );<br />



    This doesn’t solve the other problems like.. Underlining, Stricking the text, font size increasing etc. And in the links that we add using TinyMCE editor gives an extra quote in the resulting form content link!

    I am using bbpress 1.0 and there is a file by name inside bb-includes folder. I opened it and saw these codes

    function bb_allowed_tags() {
    $tags = array(
    'a' => array(
    'href' => array(),
    'title' => array(),
    'rel' => array()),
    'blockquote' => array('cite' => array()),
    'br' => array(),
    'code' => array(),
    'pre' => array(),
    'em' => array(),
    'strong' => array(),
    'ul' => array(),
    'ol' => array(),
    'li' => array()

    I added 'p' => array(), to solve the <p> tag problem.

    But all other problems regarding underline, stricking the text, adding image also doesn’t work(I have installed allow-image plugin), font size increasing also doesn’t work.

    Please help.. and if possible get back to me at satish at technotip DOT org [ Its .ORG and not .COM ].




    I see that TinyMCE editor adds <p> </p> tags after each line. How can I convert <p></p> tag to <br /> tag ?

    If this has been solved in any other threads, then please give me the link. I searched a lot before posting it here.

    Please help…its very urgent.

    @technotip: apparently you got the same problem as me with images not working with TinyMCE and Allow Images installed. D you find a solution for it?

    If so, it’d be nice if you could share. I posted a specific topic, so in case you got a solution, you may want to post it there.

    Thanks a lot.

    abdessamad idrissi


    I think the correct way to add tags is by a plugin, normally you should never edit the core code of bbpress! because if you do, next time you update your bbpress you will be deleting the modified core files, then you will get trouble with your forum not working properly.. So the best is to use a plugin for things that deal with core files..

    PS: Core files are files that are not Themes nor plugins, such as files under; bb-includes and bb-admin,

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.
Skip to toolbar