- How to define your own XML schema?
- How to configure the XML processor?
- How to add custom actions and tabs to Smart Document Pane?
- How to configure callback handler?
- How to configure Schematron content validation rules?
- How to configure track-changes content validation rules?
- How to configure content validation rules?
How to add custom actions and tabs to Smart Document Pane?
This sample demonstrates the capability of adding custom tabs and context menu items in Smart Document Pane, along with handling conditional validation and execution of associated actions.
In general, using Task Pane extensibility following use cases can be achieved
Add new custom tab
You can add a custom tab based on iframe.
You can specify custom tab configuration in the entity-actions.json file under assetTabs key. This file should be present in the server configuration folder under sub folder named xmlauthor. This sample is adding the custom tab with id “qpp-iframe-tab”.
Hide default tabs
You can hide default tabs by setting hidden property of the specific tab in the entity-actions.json file e.g., following configuration will hide Properties tab.
"assetTabs": [
// Other Tabs
{
"id": "qpp-properties-tab",
"hidden": true
},
// Other Tabs
]
Override label of default tabs
You can change label of default tabs by setting displayText property of the specific tab in the entity-actions.json file e.g., following configuration will change label of “Where Used” and “Links” tab
"assetTabs": [
// Other Tabs
{
"id": "qpp-links-tab",
"displayText": "Includes",
"hidden": false
},
{
"id": "qpp-usedby-tab",
"displayText":: "Included In",
"hidden": false
}
// Other Tabs
]
Add new custom context menu actions
You can define custom context menu actions in the entity-actions.json file under assetContextMenuActions key e.g., this sample is adding following context menu actions
- qpp-iframe-action: The type of this context menu action is “tab” and it selects iframe based custom tab (specified by tabId).
- qpp-custom-action: This is “default” type of context menu action. When clicked, it invokes Java Script function specified by actionHandler.
You can conditionally hide custom context menu actions by specifying visibilityHandler Java Script function.
Please note, all Java Script functions should be available as part of EntityActions object at the window level.
Hide default context menu actions
You can hide default context menu actions by setting hidden property of the specific action in the entity-actions.json file e.g., following configuration will hide Properties action.
"assetContextMenuActions": [
// Other Actions
{
"id": "qpp-properties-action",
"hidden": true
}
// Other Actions
]
Override labels of default context menu actions
You can change label of default context menu actions by setting displayText property of the specific action in the entity-actions.json file e.g., following configuration will change label of “Go to” action
"assetContextMenuActions": [
// Other Actions
{
"id": "qpp-go-to-action",
"displayText": "Go to content",
"hidden": false
}
// Other Actions
]
Configuration
To configure the Task Pane Sample, follow the steps mentioned below:
- Copy the following files to the Quark XML Author installation folder, e.g. “C:\Program Files\Quark\Quark XML Author”
Quark.CMSAdapters.Samples.XA.QPP.TaskPane.dll
-
Quark.CMSAdapters.Samples.XA.QPP.TaskPane.pdb
- Copy all files and folders inside
config/client
to the Quark XML Author installation folder. - Copy all files and folders inside
config/server
to the Platform Server configuration folder. - Add the highlighted EI below to the
[Language Folder]/AppConfig/AppConfig-ext/MethodInfo_ext.xml
file<Method id="RegisterJsCallbacks" assembly="Quark.CMSAdapters.Samples.XA.QPP.TaskPane"
class="Quark.CMSAdapters.Samples.XA.QPP.TaskPane.ExtensibilityMethods" method="RegisterJsCallbacks"/> - Add the highlighted below to the
[Language Folder]/AppConfig/AppConfig-ext/ Connect_ext.xml
file<ExtensibilityMethod id="RegisterJsCallbacks"/>