[TYPO3-rte] free-field for additional attributes

Ron Hall ronslists at busynoggin.com
Wed Apr 6 14:55:12 CEST 2011


Hello Franz,

Another way to handle this with htmlAreaRTE is to set up a special class for links in which you want to have that behavior. You can then use that class to trigger the JavaScript you want. I use that to create links to open a lightbox and play a video.

This does not allow ad hoc JS to be added to any link but is nice because the classes can be selected by non-technical users from the drop-down in the link browser. It also has the advantage that if you need to tweak the behavior later you only have to do it in you JS file and not find every instance to change.

Thanks,
Ron Hall




On Apr 6, 2011, at 7:42 AM, Franz Kugelmann wrote:

> Hi Marcus,
> 
> thanks for the reply/tip, i knew that already, could have posted that fact in the first run though.
> Anyway, i thought this might be interesting for the rtehtmlarea-users, which are probably most of the TYPO3-users...
> But at least for our customer tinymce is a good option i think...
> 
> Greets, keep rocking!
> Franz
> 
>> Hi Franz,
>> 
>> I know you are asking about htmlArea-RTE, but the tinymce_rte has already this feature.
>> 
>> I you set a link there with the "normal" dialog, there is a tab "events" / "Ereignisse" where you can set this value.
>> 
>> Kind regards,
>> Marcus
>> 
>> Franz Kugelmann schrieb am 05.04.11 17:09:
>>> Hi list,
>>> 
>>> a customer was asking about the possibility to add a custom onClick=""
>>> attribute to some of the rte-generated links.
>>> After checking the code, i understand that currently there is no
>>> possibility like this.
>>> 
>>> Do you think it would make sense to have a "free" field, where you can
>>> add a whole attribute like _onClick="alert('wow')"_ configurable like
>>> the rel-attribute (buttons.link.relAttribute.enabled)
>>> 
>>> We would try to create a patch for gerrit if you think that is a good
>>> way to go and something useful for the next TYPO3-version.
>>> 
>>> Since we would probably have to adapt also the parseFunc and the
>>> frontend-rendering, we wonder if there isn't a smarter solution.
>>> 
>>> Writing an additional extension means using XCLASSES, which i would
>>> rather avoid.
>>> Adding new hooks for such fields to be implemented would also be an option.
>>> 
>>> Thanks for sharing your opinions!
>>> 
>> 
> 
> 
> -- 
> Franz Kugelmann, elementare teilchen GmbH
> http://www.elementare-teilchen.de
> _______________________________________________
> TYPO3-project-rte mailing list
> TYPO3-project-rte at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-rte
> 



More information about the TYPO3-project-rte mailing list