silverstripe-bootstrap-forms icon indicating copy to clipboard operation
silverstripe-bootstrap-forms copied to clipboard

SimpleHtmlEditorField breaks JavaScript

Open jrast opened this issue 13 years ago • 1 comments

If I add a SimpleHtmlEditorField to my Form (with SimpleHtmlEditorField::create('TestField')) the javascript breaks as it tries to load a file from the location http://localhost/undefined.

jrast avatar Aug 17 '12 20:08 jrast

Ok, I have found the part which leads to this problem: In bootstrap_forms.js Line 14 we want to set the content_css, but in the second part

$t.attr('data-css')

is undefined as I don't set it on the field with

->setCSS('file');

So what is the best solution to only set this if it's not undefined?

jrast avatar Aug 17 '12 21:08 jrast