I also tried Editor Monkey and Advanced WSYIWG plugins and both didn’t play nice witht the Image Manager plugin I’m using. Which uses, Owen Winkler’s Buttonsnap functionality to add additional buttons to the RTE and non-RTE.
So, I edited the tiny_mce_gzip.php file that I mentioned above. It seems to overide the tiny_mce.js file.
So far so good. I also created a small plugin to add additional functionality to the default TinyMCE editor, ie, colors, font families, etc.
Following are the edits I made in tiny_mce_gzip.php to try to solve the bad handling of br and p elements.(I made the same edits in tiny_mce.js)
In Bold:
initArray = {
mode : "specific_textareas",
textarea_trigger : "title",
width : "100%",
theme : "advanced",
theme_advanced_buttons1 : "<?php echo $mce_buttons; ?>",
theme_advanced_buttons2 : "<?php echo $mce_buttons_2; ?>",
theme_advanced_buttons3 : "<?php echo $mce_buttons_3; ?>",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_path_location : "bottom",
theme_advanced_resizing : true,
browsers : "<?php echo $mce_browsers; ?>",
dialog_type : "modal",
theme_advanced_resize_horizontal : false,
entity_encoding : "raw",
relative_urls : false,
remove_script_host : false,
<strong>force_p_newlines : false,
force_br_newlines : false,
convert_newlines_to_brs : false,
remove_linebreaks : false,</strong>
save_callback : "wp_save_callback",
document_base_url : "<?php echo trailingslashit(get_bloginfo('home')); ?>",
I also modified the
else // Use a much smaller set
$valid_elements =
around line 120, because it seemed that the changes I made to the full list didn’t help.
(You’ll see a very lengthy list of elements located around line 113)
// Set up init variables
if ( current_user_can('unfiltered_html') ) // Use the full XHTML set provided in the docs
$valid_elements =
Here’s a text file that can be downloaded that shows the elments I used. It’s too lengthy to post here. https://mainewebworks.com/wordpress/TinyMCE_valid_elements.htm
I used the same list of elements in the tiny_mce.js.
I’m not sure if this will completely solve your problem, but it helped to prevent
closing tags overwriting the
tags I hand coded.