Override / remove standard actions from content completion menu
Posted: Wed Apr 06, 2022 1:17 pm
Hello,
I am using Oxygen component 24.0.0.2 version.
My goal is that when I insert a particular element ("myElement"), an attribute and a value is added automatically.
I would like to be able to do this without java code, just by configuring the framework.
So, I created my custom authorAction based on InsertFragmentOperation with the desired fragment.
Then, I put in contentCompletion :
It works well but "myElement" is an item of a list. So, when the cursor is inside a "myElement" and when the user hits "Enter", the content completion menu proposes "New myElement" action which does not perform my custom action (without the desired attribute).
It is the same issue with a "Split myElement" action.
So, my questions are :
- Is it possible to override these "standard" actions without java code?
or
- Is it possible to remove these "standard" actions from the Content Completion menu only for myElement?
Thank you,
Johann
I am using Oxygen component 24.0.0.2 version.
My goal is that when I insert a particular element ("myElement"), an attribute and a value is added automatically.
I would like to be able to do this without java code, just by configuring the framework.
So, I created my custom authorAction based on InsertFragmentOperation with the desired fragment.
Then, I put in contentCompletion :
Code: Select all
<contentCompletion xmlns="http://www.oxygenxml.com/ns/framework/extend">
<authorActions>
<addAction id="myCustomAction" replacedElement="myElement" useReplaceElementName="true" inCCWindow="true"/>
</authorActions>
</contentCompletion>
It is the same issue with a "Split myElement" action.
So, my questions are :
- Is it possible to override these "standard" actions without java code?
or
- Is it possible to remove these "standard" actions from the Content Completion menu only for myElement?
Thank you,
Johann