[opencms-dev] Persuading FCKEditor to use default style for content
Christian Steinert
christian_steinert at web.de
Tue Sep 19 12:33:29 CEST 2006
Jonathan Woods schrieb:
> Christian -
>
> I wasn't being very clear, and in any case I've spotted an obvious
> workaround.
>
> My concern was that the mark-up generated by FCKEditor isn't very
> controllable. I wanted to ensure that it did not generate class-less
> <div>s, but instead generated <div>s which were always given an explicit
> class (of which the default might be called 'Normal paragraph').
>
I haven't tested this so much, but where would FCKEdit generate DIVs
without class attributes?
FCKEditor inserts all sorts of Tags, but DIVs should only be inserted
when you use the style selector and have configured some style entries
to generate DIVs, shouldn't they?
> Of course, I realise now that I can achieve the same end result by making
> sure that all free-form content is contained in an outer <div> generated by
> the template, and by defining a CSS rule which matches content within that
> div:
>
> Template:
>
> <div>Template stuff preceding freeform content here</div>
> <div class="freeformContent">
> [include an FCKEditor-derived element from the
> 'body'/instance]
> </div>
> <div>template stuff following freeform content here</div>
>
> CSS matching at rendering time:
>
> /* Rule to match unclassified divs: */
> .freeformContent div {
> margin: 1em 0em 1em 0em;
> }
>
> CSS matching at editing time (cited by FCKEditor), in which context the
> enclosing .freeformContent div is not present:
>
> div {
> margin: 1em 0em 1em 0em;
> }
>
Yes, something like this was what I had on my mind...
christian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3269 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20060919/cca92542/attachment.bin>
More information about the opencms-dev
mailing list