Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have an XSLT macro that prints out a code sample like this:
<pre><code>public interface IRequestProcessor{ HttpResponse ProcessRequest();}</code></pre>
This works correct on the website. But when I render the macro in the backend editor, it seems to ignore the \n character and looks like this:
\n
Can I change this behaviour? I don't want it to ignore the newlines.
How is you macro outputting the content?
If you're using xsl:value-of, are you also using disable-output-escaping="yes" ?
Cheers,Drew
You also might try just adding <br/> tags at the end of each line, not sure if there is another way around it.
The Output is a <pre> Element, so
<pre>
disable-output-escaping="yes" won't escape the HTML brackets and <br /> won't work as a line break.
disable-output-escaping="yes"
<br />
Any other ideas? The XSLT/Macro itself works fine on the site. I have only the issue with the macro rendering in the backend editor.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Macro content rendering in editor ignores newlines
I have an XSLT macro that prints out a code sample like this:
This works correct on the website. But when I render the macro in the backend editor, it seems to ignore the
\n
character and looks like this:Can I change this behaviour? I don't want it to ignore the newlines.
How is you macro outputting the content?
If you're using xsl:value-of, are you also using disable-output-escaping="yes" ?
Cheers,
Drew
You also might try just adding <br/> tags at the end of each line, not sure if there is another way around it.
The Output is a
<pre>
Element, sodisable-output-escaping="yes"
won't escape the HTML brackets and<br />
won't work as a line break.Any other ideas? The XSLT/Macro itself works fine on the site. I have only the issue with the macro rendering in the backend editor.
is working on a reply...