[TYPO3-english] html5 data- attributes in RTE links (rtehtmlarea)
Steffen Müller
typo3 at t3node.com
Tue Oct 8 11:40:26 CEST 2013
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
More information about the TYPO3-english
mailing list