Page 1 of 1
Syntax Highlight
Posted: Tue Apr 09, 2013 6:53 pm
by bmayer
Hi,
We use oXygen Author 14.2 for DITA XML within Eclipse 3.5.2. We're trying to change the font colour for some XML elements, like Processing Instructions via Window > Preferences > oXygen > Editor > Syntax Highlight > XML. If I change the foreground colour I see the new colour via oXygen text view, but Author view doesn't update and always shows the old colour. Is there a way to get Author view to show the correct colour, i.e. the same one text view is showing? I seem to see the same thing via the standalone Editor 14.2 client.
Thanks,
Belinda
Re: Syntax Highlight
Posted: Tue Apr 09, 2013 7:15 pm
by Costin
Hello,
Please note that the syntax highlight only applies for the Text editing mode (not for the Author mode), affecting the color specific tags (elements, attributes, PIs, etc) are displayed.
Therefore, the eventual changes you made in any of the tabs from Window > Preferences > oXygen > Editor > Syntax Highlight, would affect only the Text mode.
For the Author mode, changes to the way some elements would be displayed could be carried using CSS instead.
However, in order to have a broader idea about what you are trying to obtain, could you please provide more details about the changes you are trying to get and their context?
Some screenshots might also prove helpful.
Regards,
Costin
Re: Syntax Highlight
Posted: Tue Apr 09, 2013 7:48 pm
by bmayer
Thanks Costin, looks like CSS is the way to go then. I don't seem to be able to attach a screen capture to the post so I'll try to describe what I'm looking for. In Author view, we'd like to change processing instructions from purple text to black text.
<p><?sample processing instruction?></p>
Thanks,
Belinda
Re: Syntax Highlight
Posted: Wed Apr 10, 2013 8:50 am
by Radu
Hi Belinda,
You need a CSS customization for this.
If you open this CSS:
OXYGEN_PLUGIN_DIR/frameworks/dita/css_classed/dita.css
after all the @import's you can add this:
Code: Select all
@namespace oxy "http://www.oxygenxml.com/extensions/author";
oxy|processing-instruction {
color: black !important;
}
Regards,
Radu
Re: Syntax Highlight
Posted: Wed Jun 26, 2013 4:24 pm
by bmayer
Hi Radu,
I was testing this out on the latest release 15 build in Eclipse. When I view a DITA XML topic with a processing instruction the font is blue, however, it's now opening up a Results window. It doesn't display anything in the Results but it opens it every time which can be a bit annoying. Can you advise if this is still the correct syntax for release 15?
Thanks in advance,
Belinda
Re: Syntax Highlight
Posted: Wed Jun 26, 2013 4:40 pm
by Radu
Hi Belinda,
The fix should still work.
I could not reproduce the issue with the empty Results window showing up.
Does it show up on your side when opening the DITA file, when modifying it or when saving? Does it show up even if you close it?
Do you also have a DITA Map opened in the DITA Maps Manager?
Regards,
Radu
Re: Syntax Highlight
Posted: Wed Jun 26, 2013 4:52 pm
by bmayer
It shows up with both opening and saving any DITA files. If you want to provide your email address, I can email you a screen capture as well as my dita.css file.
Re: Syntax Highlight
Posted: Wed Jun 26, 2013 4:55 pm
by Radu
Hi Belinda,
You can use our usual technical support email address
support@oxygenxml.com.
Regards,
Radu
Re: Syntax Highlight
Posted: Wed Jun 26, 2013 4:57 pm
by bmayer
After closing and reopening Eclipse again it appears to be working now. Thanks for your help!