Excluding code templates from content completion suggestions

Post here questions and problems related to oXygen frameworks/document types.
tpaige
Posts: 3
Joined: Wed Mar 03, 2021 6:40 pm

Excluding code templates from content completion suggestions

Post by tpaige » Tue May 18, 2021 9:44 pm

I have an external content completion file (cc_config_ext.xml) configured as part of a framework extension. The proposed values work as expected. However, I'm also getting code templates listed as part of the proposed values in Author mode. Is it possible to exclude code templates?
code_templates_in_cc_suggestions.png
code_templates_in_cc_suggestions.png (22.98 KiB) Viewed 139 times

Radu
Posts: 7535
Joined: Fri Jul 09, 2004 5:18 pm

Re: Excluding code templates from content completion suggestions

Post by Radu » Wed May 19, 2021 7:17 am

Hi,

Code templates may contain any content inside them (text, XML tags, or a combination of..), they may contain even editor variables which get expanded when the code template is inserted, so Oxygen proposes them in any context, even when element values need to be inserted.
Maybe you can create equivalent Author actions instead of the code templates. An Author action can also be added to the content completion window and has an activation XPath which can be used to configure in what context it's available.

https://blog.oxygenxml.com/topics/custo ... etion.html

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Post Reply