Display XML comments in WYSIWYG editor view.

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
owensmn
Propeller Head
Posts: 19
Joined: Fri Mar 30, 2012 6:42 am
Location: Harrogate, North Yorkshire, UK

Display XML comments in WYSIWYG editor view.

Post by owensmn »

Hi
I have a Flare topic which contains this:

Code: Select all

<p>The following text should not be included in the output</p>
<p>This is work in progress.</p>
I want to wrap these 2 paragraphs in an XML comment so it looks like this:

Code: Select all

<!-- <p>The following text should not be included in the output</p>
<p>This is work in progress.</p> -->
Doing this will exclude the 2 paragraphs from the build output. It will also not show them in the WYSIWYG editor view.

Can these comments be made to appear in the WYSIWYG editor view? I don't want to switch to tag view to see them.
Can this be done via Flare stylesheet?

Cheers
Mark
NorthEast
Master Propellus Maximus
Posts: 6394
Joined: Mon Mar 05, 2007 8:33 am

Re: Display XML comments in WYSIWYG editor view.

Post by NorthEast »

I tend to use conditions for this.

Things like comments might have a condition called "comment", which is always excluded in all targets, so it's only visible in the editor.
Flare also has annotations (on Review tab) to add comments, but I never really got in the habit of using those.

Bits of content I don't want to publish yet might have a condition called "WIP" (work in progress), which I'll exclude in the live/published target, but not excluded in my 'WIP' target used for pre-release builds.
owensmn
Propeller Head
Posts: 19
Joined: Fri Mar 30, 2012 6:42 am
Location: Harrogate, North Yorkshire, UK

Re: Display XML comments in WYSIWYG editor view.

Post by owensmn »

Thanks for your reply.
Yes, conditions would be the obvious choice. Funnily enough, your description of how you use conditions is pretty similar to the way we do.

The specific issue with conditions is related to the translation of the topics into a target language, e.g., French.

The conditioned text is still part of the XML document, which means when the topic file is parsed into my translation tool, it's exposed for translation when in fact the text is WIP.

By applying XML comments into the topic (instead of using conditions) the translation tool simply ignores this text when the file is imported.

I know that Lingo allows you to handle conditions better than my translation tool does, but due to Lingos shortcomings regarding automation, it's not an option for me.

The idea of making XML Comments show in Flare's editor is a bit weird I know!
Post Reply