I want to write several div elements also with nesting within a single style in FCKCONFIG.JS The code given in the js file is:
FCKConfig.CustomStyles =
{
'Code' : { Element : 'code' },
'DekiScript' : { Element : 'pre', Attributes : { 'class' : 'script' } },
'Comment' : { Element : 'p', Attributes : { 'class' : 'comment' } },
'Box' : { Element : 'div', Attributes : { 'class' : 'divbox' , 'style' : 'background-color:#28B8FC'} },
};
The "Box" above is my new style. Which results like below:
<div class="divbox" style = "background-color:#28B8FC;"></div>
But I want to do something like this:
<div class="divbox" style = "background-color:#28B8FC;">
<div class="div1" style = "background-color:#FFF8FC;">
</div>
<div class="div2" style = "background-color:#8FCFFF;">
</div>
</div>
Can anybody tell me How can I achieve this?
Mon, 10/27/2008 - 11:50
#1
Re: Writing Multiple Elements in a Single Style in fckconfig.js
And this can go on and on as long as you like. A great feature of the FCK, really...
Re: Writing Multiple Elements in a Single Style in fckconfig
can handle a new line without ending the style;
ideal html would be:
as far as I've understood fck always ends the style asap,
giving:
I've looked into the "CreateDiv"-button which might solve it
but if it's possible to set an attribute at the styles, not to break the div,
that would be a much more intuitive solution.
Thank you for a good product.
Re: Writing Multiple Elements in a Single Style in fckconfig
as:
possible??
Re: Writing Multiple Elements in a Single Style in fckconfig
Re: Writing Multiple Elements in a Single Style in fckconfig
Yes, the create div-button works, but as it's used for a multiuser doc-site,
I'd rather avoid typing classes into the textbox.
What's the proper way of populating the combobox in the "createDiv"-popup-window?
I've browsed the FCKconfig-doc's but no luck yet.
Re: Writing Multiple Elements in a Single Style in fckconfig
Maybe it is here: http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.stylesSet...
Also it is useful to read this too: http://docs.cksource.com/CKEditor_3.x/Developers_Guide/Styles...
Re: Writing Multiple Elements in a Single Style in fckconfig
How can I add Styles to the dropdown box in Create Div container box?