silverstripe-bootstrap-forms
silverstripe-bootstrap-forms copied to clipboard
SimpleHtmlEditorField breaks JavaScript
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.
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?