Jump to:

23480 Posts in 18951 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » in-line "style" gets stripped in 2.4.1

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

Page: 1
Go to End
Author Topic: 819 Views
  • webmmsd
    Avatar
    Community Member
    10 Posts

    in-line "style" gets stripped in 2.4.1 Link to this post

    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

  • ttyl
    Avatar
    Community Member
    114 Posts

    Re: in-line "style" gets stripped in 2.4.1 Link to this post

    Me too - help?

  • Greg1
    Avatar
    Community Member
    28 Posts

    Re: in-line "style" gets stripped in 2.4.1 Link to this post

    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

    819 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.