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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

HTML Editor ignoring me turning off verify_html


Go to End


2 Posts   1612 Views

Avatar
lozhowlett

Community Member, 151 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, 14 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?