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

HTML Editor ignoring me turning off verify_html


Reply


2 Posts   639 Views

Avatar
lozhowlett

Community Member, 146 Posts

9 September 2011 at 12:01am

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

Avatar
sirocco

Community Member, 11 Posts

13 June 2014 at 9:52pm

Hey - I know it's been a very long time, but I'm having a similar issue. Did you ever get resolution?