Jump to:

22975 Posts in 11620 Topics by 2826 members

General Questions

SilverStripe Forums » General Questions » HTML Editor ignoring me turning off verify_html

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: 491 Views
  • lozhowlett
    Avatar
    Community Member
    140 Posts

    HTML Editor ignoring me turning off verify_html Link to this post

    Hi,

    I have SS v.2.3.6 and in mysite/_config.php i have this code

    // This line set's the current theme. More themes can be
    // downloaded from http://www.silverstripe.com/themes/
    HtmlEditorConfig::get('cms')->insertButtonsAfter('formatselect', 'forecolor');
    HtmlEditorConfig::get('cms')->insertButtonsAfter('forecolor', 'backcolor');
    HtmlEditorConfig::get('cms')->insertButtonsAfter('backcolor', 'removeformat');
    HtmlEditorConfig::get('cms')->setOption('apply_source_formatting', 'false');
    HtmlEditorConfig::get('cms')->setOption('verify_html', 'false');
    HtmlEditorConfig::get('cms')->setOption('valid_elements', 'a[href|target|rel|class],b,br,font,img[src|id|width|height|align|hspace|vspace|style],i,li,p[class|id|style|align],h1,h2,h3[style|align],h4,h5,h6,span[class],textformat[blockindent|indent|leading|leftmargin|rightmargin|tabstops],u,table,tr,td,div[class|id|style|align],ul[id|class]');

    However, when I try to float left an image in the cms like this <img src="sk.jpg" style="float:left">, when I click insert the style element gets stripped!

    Any ideas? I have tried all the previous tickets and forum suggestions to no success

    cheers

    491 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.