Page 1 of 1

Adding comments and processing instructions

Posted: Tue Jul 05, 2022 1:44 am
by tstevens
In the desktop author, pressing return opens a menu that contains options to add XML comments and processing instructions as well as elements.
In the web author the menu does not contain these options. Is there a way to enable them in web author?

Re: Adding comments and processing instructions

Posted: Tue Jul 05, 2022 3:56 pm
by Gabriel Titerlea
Hello,

Indeed, the Comment and Processing Instructions actions are not present in Oxygen XML Web Author.
I've registered an internal ticket to fix this, and we'll update this forum post when we have a solution.

As a workaround you can extend the DITA framework using a framework extension script [1].
You can implement an "Insert Processing Instruction" and an "Insert XML comment" action. And add them to the content-completion menu [2] yourself.

To implement the above actions you can define an action that uses the InsertFragmentOperation to insert these fragments:
- "<!-- -->"
- "<?PITarget PIContent?>"

Best,
Gabriel

[1] https://www.oxygenxml.com/doc/versions/ ... zt_5ry_jnb
[2] https://www.oxygenxml.com/doc/versions/ ... gh_yzm_knb