TinyMCE changes my inline CSS
I introduce this in an HTML editor:
<p style="border:1px solid #edede4;border-top:none"></p> I click update and click the html editor again. HTML (in Firefox) changed to:
<p style="border-style: none solid solid; border-color: -moz-use-text-color rgb(237, 237, 228) rgb(237, 237, 228); border-width: medium 1px 1px;" mce_style="border:1px solid #edede4;border-top:none"><br></p> If I do the same in Internet Explorer, the HTML changes to:
<P style="BORDER-RIGHT: #edede4 1px solid; BORDER-TOP: medium none; BORDER-LEFT: #edede4 1px solid; BORDER-BOTTOM: #edede4 1px solid" mce_style="border:1px solid #edede4;border-top:none"> </P> Why is this changing in the world? Perhaps there are some TinyMCE settings that I can change? But I already have a cleanup: a lie. Ideas?
If I turn on cleanup, the change I mention is not happening. However, TinyMCE changes a lot of other things. I don't want him messing with my code :( Any help would be appreciated.
Try setting verify_html to false.
Sometimes inline styles are necessary, as was the case with this project.
In this case, I just inserted the html code in parts. Instead of embedding:
<p style="border:1px solid #edede4;border-top:none"></p> I did something like this:
<p style= "border:1px solid #edede4;border-top:none "></p> This is not ideal, but it works for this case, since I do not want to change the settings of TinyMCE. And it is not recognized by TinyMCE as a style code.
When I have too many problems with TinyMCE, I'm just trying to create other alternatives. The "right" way is to create a class in you css.
Instead:
<p style="border:1px solid #edede4;border-top:none"></p> Using:
<p class="p_border"></p> And declare in your css:
.p_border { border:1px solid #edede4; border-top:none; } Unfortunately, you are doing a newsletter, so you need a built-in. I have not tested the creation of "style" tags before each "p" in this scenario with the class I above. You can try to see if it works.
If this does not work, I will try to use "inline_styles: true".