Noticing that in the last WP update or two there have been some changes to TinyMCE editor where code that used to be left untouched in the WP editor is being stripped when switching back between the visual / html modes. Turning off the visual editor is not an option for our users which depend on it.
Anyone have any ideas on how can we implement the following code without it getting completely deleted as it currently is? The following are deleted since last WP update whereas there were no issues with this code for the last few years in the sites we have using it ....
<div class="button_1"> </div>
or
<p class="button_1"> </p>
We're also noticing that breaks are being replaced with non-breaking spaces ....
Noticing that in the last WP update or two there have been some changes to TinyMCE editor where code that used to be left untouched in the WP editor is being stripped when switching back between the visual / html modes. Turning off the visual editor is not an option for our users which depend on it.
Anyone have any ideas on how can we implement the following code without it getting completely deleted as it currently is? The following are deleted since last WP update whereas there were no issues with this code for the last few years in the sites we have using it ....
<div class="button_1"> </div>
or
<p class="button_1"> </p>
We're also noticing that breaks are being replaced with non-breaking spaces ....
We've disabled the kses / autotop and texturize filters and the only thing that works so far is installing the TinyMCE Advanced plugin and then checking the "stop removing and <p> tags" option ....
It seems as if TinyMCE is doing something that autotop / texturize / and kses are not ....We're trying to figure out how to enable this functionality via some code added to functions.php so we don't have to install the plugin and then go to each blog one by one and then save TinyMCE screen with the "stop removing and <p> tags" option checked .... too much work with the number of sites we're working with and don't want to add a plugin for this one function if possible ....
Tracy - did you ever get a solution to this? I'd love to post about it on wpmu.org. It's a really, really frustrating problem and no doubt even more frustrating for Multisite networks. If you have a custom piece of code that I could share with our readers that'd be very cool.
Responses (4)
WPMU DEV Fanatic — 13th July 2011 #
Hi Tracy,
Good question and I see you've posted on wp.org about the matter. I'll ask a few of the brilliant folks around here if they've got any ideas on this.
Meanwhile, I found the following, while bulky, works for line breaks and isn't stripped:
<br style="clear:both;" />Cheers,
David
Member — 13th July 2011 #
We've disabled the kses / autotop and texturize filters and the only thing that works so far is installing the TinyMCE Advanced plugin and then checking the "stop removing
and <p> tags" option ....
It seems as if TinyMCE is doing something that autotop / texturize / and kses are not ....We're trying to figure out how to enable this functionality via some code added to functions.php so we don't have to install the plugin and then go to each blog one by one and then save TinyMCE screen with the "stop removing
and <p> tags" option checked .... too much work with the number of sites we're working with and don't want to add a plugin for this one function if possible ....
Sales & Support Pro — 27th July 2011 #
Hiya,
You could modify the plugin to change the default setting and then place it in mu-plugins.
That would mean that every blog would automatically have the plugin installed with the "stop removing <p> tags" setting on.
Phil
Blog Master — 4th August 2011 #
Tracy - did you ever get a solution to this? I'd love to post about it on wpmu.org. It's a really, really frustrating problem and no doubt even more frustrating for Multisite networks. If you have a custom piece of code that I could share with our readers that'd be very cool.
Become a member