[TYPO3-dev] [Fwd: Re: text/img and img elements with css-class?]

Franz Koch typo.removeformessage at fx-graefix.de
Tue Dec 16 10:01:50 CET 2008


Hi Stephan,

>> And assigning a css-Class is nicely working for me when I activate 
>> images for RTE (which I disable by default) - you can select it in the 
>> same dialog where you can configure the dimensions, the floating as 
>> well as the "alt" and "title" attribute (once a image is inserted, 
>> rightclick the image and edit it's properties).
>> And you should know that you need to tell the RTE which classes are 
>> allowed to be used for images:
>>
>> --- pageTS ---
>> RTE.default.classesImage = class1,class2,class3
>> --------------
>>   
> yes, that's what i already have achieved.
> works quite nicely, right.
> 
> BUT: going this way i have no possibility to add a caption.
> or am i mistaken?

it's somehow possible - but don't ask me - I never use images inside the 
RTE, because they are a pain to use and style properly. That's why we 
advised you to use the regular "TEXT with IMAGE" content elements etc. 
and started discussing how to achieve something like you (and others) 
wanted to do best with those.

I think you could create your own code snippets a editor can place 
inside the RTE (see manual of htmlarea). Those code snippets could also 
be a container for a image with caption. But again, I can't tell if this 
way is in any way usable.

Another way would be to write your own image-dialog for the RTE - but 
modifying the regular CEs would be much easier than that.


> so there seems to be not one single inch of understanding my wish.
> and probably take it as a suggestion to include it in the future MEDIA 
> htmlarea?!

You try to achieve the possibilities of the content elements "text with 
image" inside the RTE? So why not simply use those and alter their 
rendering?

You could easily modify those content elements to provide a dropdown 
selector for some special classes. All you need to do is to write your 
own little addon extension and add this field (easily done with the 
extension kickstarter). Once set in the CE by a editor, you can use it 
for styling in the layouts you can define for tt_content.image.20.

If you want that editor can only place one image in combination with 
text content, you can easily alter the form fields with some additional 
TCA definitions for that. You can also hide the column selector from the 
editors, so they don't even know that multicolumn images are possible by 
default. And if you only allow one single image, you can easily style 
that with altering tt_content.image.20.

>> But if you really want to have control over the size of images, use 
>> desired content elements for that and disable images in RTE.
> no, i want the editors to have control over which class they want assign 
> to an image.

you already can assign classes to the images in the RTE ;) For anything 
more enhanced I'd suggest using the provided content elements. If you 
don't want to do that - I can't provide any further help, because I 
simply don't know (and don't want to wast time finding out) how to do 
this inside the RTE.

-- 
kind regards,
Franz Koch




More information about the TYPO3-dev mailing list