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

grac grac at gmx.ch
Sun Dec 21 11:56:13 CET 2008


hi joey

JoH asenau wrote:
> Just to show you that most of (if not all) the stuff you want is already
> there:
>
> lib.parseFunc_RTE {
>  externalBlocks := addToList(img)
>  externalBlocks {
>    img {
>      callRecursive = 1
>      callRecursive.tagStdWrap {
>        HTMLparser = 1
>        HTMLparser {
>          allowTags = img
>          tags {
>            img = 1
>            img {
>              allowedAttribs = alt,class,src
>            }
>          }
>        }
>      }
>    }
>  }
>
> Taken from these parts of TSref:
> http://typo3.org/documentation/document-library/references/doc_core_tsref/4.2.0/view/1/5/#id4198758
> http://typo3.org/documentation/document-library/references/doc_core_tsref/4.2.0/view/1/5/#id4208523
> http://typo3.org/documentation/document-library/references/doc_core_tsref/4.2.0/view/1/5/#id4208672
>
> To get the desired classes in the popup-image-dialogbox use this one as Page
> TSconfig:
> RTE.default.classesImage = cool,cooler,coolest
> http://typo3.org/documentation/document-library/extension-manuals/rtehtmlarea_manual/1.7.4/view/4/4/
>
> And to make the whole thing perfectly fitting the 1em=10px approach you
> could try adding a userFunc to the fixAttribs Parameter to process the
> values:
>
> lib.parseFunc_RTE {
>  externalBlocks {
>    img {
>      callRecursive.tagStdWrap {
>        HTMLparser {
>          tags {
>            img {
>              allowedAttribs = alt,class,src,width,height
>              fixAttrib.width.userFunc =
> tx_yourextension->user_YourWidthFunction
>              fixAttrib.height.userFunc =
> tx_yourextension->user_YourHeightFunction
>            }
>          }
>        }
>      }
>    }
>  }
>
> although I'm not sure if the width/height attributes are allowed to contain
> em values.
> So maybe it would be even better to use the userFunc for an additional style
> attribute implementing the desired em values calculated on the size given by
> the editors.
> So i.e. instead of width="325" you would get style="width:32.5em;"
>
> IMHO this would be much better than just using classes or percentages,
> because the editors would be able to work with units they are used to while
> defining the size of an image, though still having a relative pendant for
> the FE output available and of course you would still be able to override
> the size of the inline style, if the editor choose a class by using
> !important inside the class definition.
>
> HTH
>
> Joey
>
>   
didn't really work.
but i found my own workaround, as described earlier.

so, therefore i consider this thread as closed, but not as solved.

the discussion so far showed me a general unwillingness of the dev-team 
to go deeply into the topic of ELASTIC LAYOUTS, including IMAGES (as 
genuine content elements, not as decoration elements).

all i heard were technical notes on the feasibility, but nothing 
concerning the current dispute RE WEB 2.0 usability.

in my view this is very sad.
but it tells a lot about the lack of layout specialists in the typo3 
community.

no offence :-)

stephan




More information about the TYPO3-dev mailing list