Displaying XSL / XML syntax sample code
-
This is a nightmare from what i can see unless you use the TEXT editor and the CODE tag ONLY.
If I insert some sample XSL script into CODE blocks. Example:
<xsl:choose> <xsl:when test="@ItemPosition='1' and Assistant!=''"> <xsl:text><span style="background-color: #ffff00;">1st:</span> </xsl:text> </xsl:when> <xsl:when test="@ItemPosition='2'"> <xsl:text><span style="background-color: #ffff00;">2nd:</span> </xsl:text> </xsl:when> <xsl:when test="@ItemPosition='3'"> <xsl:text><span style="background-color: #ffff00;">3rd:</span> </xsl:text> </xsl:when> </xsl:choose>
I can edit it to my hearts content. But if I use the TinyMCE edit to edit this post (with the TinYMCE editor being the default at the moment I edit) it strips all the XSL syntax.
Now, I realise that I can add a load of XSL tags into my custom functions.php class to permit these syntax words but that will be a nightmare. XSL has a lot of syntax. Is there really no standard (TinyMCE compatible) where we can insert code snippets and they look correct to the user and still be editable afterwards in either editor?
- You must be logged in to reply to this topic.