Silverstripe Version: 4.11
I am not sure what is going on but
HtmlEditorConfig::get('cms')
->addButtonsToLine(1, 'styleselect')
->setOptions([
'importcss_append' => true,
'style_formats' => $formats,
'extended_valid_elements' => 'div[class|id|style]',
'block_formats' => 'Paragraph=p;Div=div;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre'
]);
This is making it very difficult to insert shortcodes as they get wrapepd in <p>
tags instead of div
Also media, e.g. youtube as only the placeholder is inserted rather than the surrounding div tag.
Has anyone experienced this problem and found a solution?
Thanks in advance.