[TYPO3-english] html5 data- attributes in RTE links (rtehtmlarea)

Peter Linzenkirchner liste at lisardo.de
Tue Oct 8 12:59:15 CEST 2013


Hello Steffen, 

as far as i know all versions rte does have this problem. I struggle with it for about months. 

Until 4.7 there was no possibility to enter a data-attribute in the link widget. Only this possibility was added in 4.7 but the rendering engine and the depending typolink-functions remains the same. So it is not possible to render data-attributes correct in typolink. 

http://wiki.typo3.org/TYPO3_4.7#htmlArea_Rich-Text-Editor
"Especially to support the many great possibilities HTML5 offers, htmlArea RTE has been extended. ...." 
This is correct: all data attributes on all tags are preserved. But on anchors it means that the link is preserved as it is: 
<a href="http://example.com/?id=4" class="internal-link">My Link</a>
and not converted in typolink: 
<link 4 - internal-link>My Link</link>

Is this a bug? I dont know. I would say it is a missing feature, not only in rte but in typolink. 

Perhaps we should post it in the bug tracker. 

Peter


Am 08.10.2013 um 11:40 schrieb Steffen Müller <typo3 at t3node.com>:

> Hi.
> 
> When adding data- attributes to links in RTE, the links are not rendered
> anymore with realurl.
> 
> The changelog of 4.7 [1] states that this is supported. I use a 6.1
> installation.
> 
> How I create link with data attibute:
> I add a link to an internal page with the "modify link" button.
> Then I switch to html view with the "toggle text mode" button and add
> the the attribute data-foo="bar" to the link.
> After saving the element and looking at the FE, the link is there, but
> nor rendered with pagepath by realurl as expected, but as ?id=3.
> If I create a link without data- attribute, it gets rendered with page
> path (/path/page.html)
> 
> 
> Link without data-attribute in RTE :
> <a href="http://example.com/?id=4" class="internal-link">My Link</a>
> 
> Link without data-attribute as it is stored in DB:
> <link 4 - internal-link>My Link</link>
> 
> 
> Link with data-attribute in RTE :
> <a data-foo="bar" href="http://example.com/?id=4" class="internal-link"
> rtekeep="1">My Link</a>
> 
> Link with data-attribute as it is stored in DB:
> <a data-foo="bar" href="?id=4" class="internal-link">My Link</a>
> 
> 
> Why does RTE not transform the link with data-attribute to a <link> tag?
> How to render links with data-attributes as "usual" typolinks so that
> realurl parses them?
> 
> 
> [1] http://wiki.typo3.org/TYPO3_4.7#htmlArea_Rich-Text-Editor
> 
> 
> -- 
> cheers,
> Steffen
> 
> Active Contributor TYPO3 CMS
> 
> TYPO3 Blog: http://www.t3node.com/
> Twitter: @t3node - http://twitter.com/t3node
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english

--
Xing: http://www.xing.com/profile/Peter_Linzenkirchner
Web: http://www.typo3-lisardo.de
Facebook: http://tinyurl.com/lisardo-multimedia



More information about the TYPO3-english mailing list