Activation Xpath for a custom javascript framework action
Having trouble deploying Oxygen XML Web Author? Got a bug to report? Post it all here.
-
- Posts: 98
- Joined: Tue Mar 06, 2018 2:07 pm
- Contact:
Activation Xpath for a custom javascript framework action
Hello,
When I create a custom framework action via the UI, I can setup an "activation Xpath" that permit to control when my action is available.
When I create a custom framework action with javascript I can use following function :
But it seems that it's not possible to use an "activation Xpath" here.
So the question is : is it possible to setup an "activation Xpath" for a custom javascript framework action?
Thanks.
Regards,
Nicolas
When I create a custom framework action via the UI, I can setup an "activation Xpath" that permit to control when my action is available.
When I create a custom framework action with javascript I can use following function :
Code: Select all
MyAction.prototype.isEnabled = function () {
return !this.editor.getReadOnlyState().readOnly;
};
So the question is : is it possible to setup an "activation Xpath" for a custom javascript framework action?
Thanks.
Regards,
Nicolas
Nicolas Delobel
AmeXio
nicolas.delobel at amexiogroup.com
AmeXio
nicolas.delobel at amexiogroup.com
-
- Posts: 515
- Joined: Wed May 20, 2009 2:40 pm
Re: Activation Xpath for a custom javascript framework action
Hello,
You can read more details about the actions "activation XPath" in the Migrating a Framework from Oxygen XML Editor/Author to Web Author topic from our Oxygen XML Web Author Customization Guide.
If the configured activation XPath evaluates to false at the current cursor position, it does not disable the actions on the Web Author toolbar, but when the user tries to invoke an action, the operation will not be executed (if the XPath evaluates to false) and the user will be notified that the action is not available at that location.
Best Regards,
Mihaela
You can read more details about the actions "activation XPath" in the Migrating a Framework from Oxygen XML Editor/Author to Web Author topic from our Oxygen XML Web Author Customization Guide.
If the configured activation XPath evaluates to false at the current cursor position, it does not disable the actions on the Web Author toolbar, but when the user tries to invoke an action, the operation will not be executed (if the XPath evaluates to false) and the user will be notified that the action is not available at that location.
Best Regards,
Mihaela
Mihaela Calotescu
http://www.oxygenxml.com
http://www.oxygenxml.com
-
- Posts: 98
- Joined: Tue Mar 06, 2018 2:07 pm
- Contact:
Re: Activation Xpath for a custom javascript framework action
Hello Mihaela,
Thanks for this information.
But my question was more : how can I define an activation xpath with javascript code ?
Thanks.
Regards,
Nicolas
Thanks for this information.
But my question was more : how can I define an activation xpath with javascript code ?
Thanks.
Regards,
Nicolas
Nicolas Delobel
AmeXio
nicolas.delobel at amexiogroup.com
AmeXio
nicolas.delobel at amexiogroup.com
-
- Posts: 515
- Joined: Wed May 20, 2009 2:40 pm
Re: Activation Xpath for a custom javascript framework action
Hello,
Sorry for not answering to your question exactly. You cannot define an activation XPath with javascript code. Some details about your use case can help us identify if there is another way to use the javascript API to accomplish what you need.
Best Regards,
Mihaela
Sorry for not answering to your question exactly. You cannot define an activation XPath with javascript code. Some details about your use case can help us identify if there is another way to use the javascript API to accomplish what you need.
Best Regards,
Mihaela
Mihaela Calotescu
http://www.oxygenxml.com
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service