Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: tinyMCE losing

formatting on Edit

In functions.bb-formatting.php on line 62 there is this function:

function bb_code_trick_reverse( $text ) {
$text = preg_replace_callback("!(<pre><code>|<code>)(.*?)(</code></pre>|</code>)!s", 'bb_decodeit', $text);
$text = str_replace(array('<p>', '<br />'), '', $text);
$text = str_replace('</p>', "n", $text);
$text = str_replace('<br />', '<br />', $text);
$text = str_replace('<p>', '<p>', $text);
$text = str_replace('</p>', '</p>', $text);
return $text;
}

In my theme’s functions.php file I made a filter that replaces this function with my own that simply removes the $text = str_replace('</p>', "n", $text); and $text = str_replace(array('<p>', '<br />'), '', $text); lines and that took care of it for me when I integrated FCKeditor into my forum.

Skip to toolbar