Bloomreach - CKEditor 4: Add style element "div" with "div" in it

336 Views Asked by At

I use "CKEDITOR.stylesSet.add(...)" in a custom .js for my CMS. I can add custom styles for headlines, p-tag, ul here...but how can I add a "div", so that two children div will be in it?

I start to add a "div" in this way: CKEDITOR.stylesSet.add("ifmstyle", [
{
name: "Custom DIV",
element: "div",
attributes: {
class: "custom-div",
},
},
]

..that means, that I have a div where I can place images, p-tags, a-tags for example. But I would like to make it like this (My custom div will have two children divs):

Custom DIV

  • children-div1
  • children-div2

image example

1

There are 1 best solutions below

0
Jeroen Hoffman On

You're basing your code on this doc page, right? https://documentation.bloomreach.com/14/library/concepts/document-types/html-fields/customize-ckeditor-styles.html

This is about the content perspective. You can change styling there but you can't change the markup unless you fork/rewrite some underlying Wicket code.

HTH Jeroen

BTW community.bloomreach.com is more active then SO here