Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

in-line "style" gets stripped in 2.4.1


Reply

3 Posts   829 Views

Avatar
webmmsd

4 August 2010 at 11:40am Community Member, 10 Posts

Hello,

Went from 2.3 to 2.4.1. If I modify some of the html in the tinymce editor and hit save it friggin strips it out. I don't make it a habit but at times we have to put up a quick page for a month or so and something doesn't already fit a rule in the CSS. In this case I have a logo that is visually off centered and wanted to do this:
<img style="margin-left: -20px;" src="assets/Uploads/FOS/TheBigBay-logo.jpg" alt="the big bay logo" width="255" height="134" />

but tinymce does this after a save:
<img src="assets/Uploads/FOS/TheBigBay-logo.jpg" alt="the big bay logo" width="255" height="134" />

notice the - style="margin-left: -20px;" is gone.

Please any clues for a work around, it will help save my sanity!
Thanks in Advance- Alex - mmsd

Avatar
ttyl

18 August 2010 at 4:09am Community Member, 114 Posts

Me too - help?

Avatar
Greg1

18 August 2010 at 11:07am Community Member, 28 Posts

I don't think that style is an allowed attribute of img by default in tinymce. You can change the settings in your mysite/_config.php file as per: http://doc.silverstripe.org/htmleditorconfig#customizing_allowed_html