You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by "MOSSELMANS Rudi (OPOCE)" <Ru...@cec.eu.int> on 2006/05/12 10:11:31 UTC

img within anchor removed after leaving TinyMCE editor

I found that when putting a link on an image using <a href=".."><img src=".."/></a> the img element is removed when the contents are saved from within the TinyMCE editor.  The culprit seems to be links2lenya.xsl where the contents of the anchor tag are not passed on for further processing.

In <xsl:template match="a"> I replaced <xsl:value-of select="."/> with:

    <xsl:choose>
    <xsl:when test="child::*">
    <xsl:apply-templates select="@*|node()" />
    </xsl:when>
    <xsl:otherwise>
    <xsl:value-of select="."/>
    </xsl:otherwise>
    </xsl:choose>

Without any extensive testing, this seems to do the trick.

Rudi

P.S. I am pretty much ready to start running apache lenya 1.2.4 with the TinyMCE editor as a production tool in our workplace.