Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Skender Memed 5 posts 25 karma points
    Dec 21, 2011 @ 14:06
    Skender Memed

    version 1.2 <pre> tag

    Hi Darren,

    Is the <pre> tag supported by version 1.2 ? I've got the structure below and the content is not showing up

    <div id="xx">


    world ( the body text)



    and how can I upgrade it to version 2.0? I've bought one license for it , do I need to buy another one for version 2.0? if I upgrade does the new version sort out the problem?


    Many Thank

  • Darren Ferguson2879 karma points mvp c-trib
    Dec 21, 2011 @ 14:09
    Darren Ferguson

    Hi - you need to match the pre tag in your XSLT.

    I'm assuming that the HTML you posted is from a rich text area you want to process?

    You can have a free upgrade from 1.2 to 2.0 if you need but your issue isn't a restriction of 1.2


  • Skender Memed25 karma points
    Dec 22, 2011 @ 12:13
    Skender Memed

    Hi Darren, 

    Yes , the HTML is from rich text editor.

    How can I match it with fo ? Could you please provide me the xsl template for matching pre tag?

    Many Thanks


  • Darren Ferguson2879 karma points mvp c-trib
    Dec 22, 2011 @ 15:44
    Darren Ferguson

    In the example XSL there is a template to match a paragraph tag - i'd copy that and have it match pre instead of p


  • Skender Memed25 karma points
    Dec 22, 2011 @ 17:36
    Skender Memed

    Thanks for your quick reply.

    I've added a template to match the pre tag but it loses the pre-formating! 

    Do you have any idea how can I resolve this issue?



  • Tom Fulton4488 karma points c-trib
    Dec 22, 2011 @ 18:46
    Tom Fulton


    Check out this page:  HTML to Formatting Objects which tells you which FO elements to use in place of FO elements, it even includes templates to do the transforming.  For Pre you can use:

    <xsl:template match="pre">
      <fo:block font-family="monospace"
        <xsl:apply-templates select="*|text()"/>

    And if you need any special formatting of course you can add it to the block above...


Please Sign in or register to post replies

Write your reply to:

Draft is the community mothership for Umbraco, the open source cms. With a friendly forum for all your questions, a comprehensive documentation and a ton of packages from the community. This site is running Umbraco version 7.3.0-RC