- How to Configure Quark Author?
- How to Add Panes, Plugins, Widgets, and Navigation Menu Items in Quark Author?
- How to Add a Callback Handler?
- How to map Check-in/Asset Picker attributes?
- How to Add a Custom Figure?
- How to Add a Custom Tag Plugin?
- How to Add Custom Style?
- How to Configure Rules Validation in Quark Author?
How to Configure Quark Author?
To configure Quark Author, make changes in the following configuration files:
- S3/qaservice/conf/app-config.json
- S3/qaservice/conf/qa-config.json
- S3/qaservice/conf/structure/Smart Document/qa-config.json
window.QA contains two objects – author and engine.
These objects contain all the APIs required for Quark Author.
Examples of Accessing QA APIs
- Get Editor Instance
QA.author.qaCore.editorInstance
- Add Event Listener
QA.engine.qaMetaDataManager.addListener(QA.engine.qaMetaDataManager.Events.META_VALUE_CHANGE,
(data) => { console.log(data) }
);
Configure app-config.json
Map a Query for Document Templates
To perform the following action, users need to make changes in the app-config.json file: S3/qaservice/conf/app-config.json
{
"documenttemplate": [
{
"contenttype": "Document Content Type",
"templatequery": " Starter Documents” //Shared query name saved in workspace for templates.
}
]
}
Show/Hide Template Meta while Initiating Document
To perform the following action, users need to make changes in the app-config.json file: S3/qaservice/conf/app-config.json
{
"documenttemplate": [
{
"contenttype": "Document Content Type",
"showTemplateMeta": false //Default value is true. Set to false to hide meta while initiating document.
}
]
}
Show/Hide a Document Content Type in New Document Menu
To perform the following action, users need to make changes in the app-config.json file: S3/qaservice/conf/app-config.json
{
"documenttemplate": [
{
"contenttype": "Document Content Type",
"enableNew": false //Default value is true. Set to false to hide content type from new document menu.
}
]
}
Enable Older Versions Selection of an Asset in the Asset Picker Dialog
To perform the following action, users need to make changes in the app-config.json file: S3/qaservice/conf/app-config.json
{
"applicationsettings": {
"enableVersionSelectOnAssetPicker": true //Default value is false. Set to true to link to older versions of an asset in the Asset Picker dialog.
}
}
Configure Action Buttons (Save, Discard and Done Editing)
To perform the following action, users need to make changes in the app-config.json file: S3/qaservice/conf/app-config.json
{
"applicationsettings": {
"actions":[
{
"id": "qa-save-toolbar-btn",
"displayText": "Save", // Button label
"iconUrl": "S3://assets/save.png" // S3 or absolute url of icon
"iconCls" : "fas fa-check" // Font awesome also supported
},
{
"id": "qa-discard-toolbar-btn",
"displayText": "Discard",
"iconUrl": "assets/images/reference/discard-changes.png"
},
{
"id": "qa-done-editing-toolbar-btn",
"displayText": "Done Editing",
"iconCls" : "fas fa-check"
}
]
}
Configure qa-config.json
To configure qa-config.json, make changes in the following configuration files:
- S3/qaservice/conf/qa-config.json
This is global configuration which will be applicable for all content models. - S3/qaservice/conf/structure/Smart Document/qa-config.json
This configuration is specific to the content model. Like in example it is for Smart Document.
To override any configuration be at global or content model level you can refer to the default qa-config.json given below.
{
"version": "0.0.1",
"ckeditorPlugins": [
"tableaschart",
"reference-toolbar",
"info-toolbar",
"changetracking",
"comment",
"note",
"figure",
"imagepicker",
"conref",
"excel",
"xref",
"calstable",
"initmeta",
"qalink",
"region",
"pastefromserver",
"proofreader",
"find",
"qaspecialchar",
"viewxml",
"workflow-status",
"tableresize",
"locksmith",
"ckeditor_wiris",
"panelbutton",
"colordialog",
"colorbutton",
"domoptimizer",
"video",
"customtab",
"selectall",
"readonlyhandler",
"data-source",
"attachment",
"metaadapter",
"rulesvalidation"
],
"toolbar": {
"mainTabs": [
{
"id": "home",
"label": "Home",
"type": "main",
"mode": "any",
"items": [
"ParaStyles",
"InlineStyles",
"Bold",
"Italic",
"Underline",
"Strike",
"Subscript",
"Superscript",
"BulletedList",
"NumberedList",
"Indent",
"Outdent",
"Find",
"viewxml"
]
},
{
"id": "insert",
"label": "Insert",
"items": [
"calstable",
"insert-table-from-server",
"insert-region-from-server",
"tableaschart",
"figure",
"imagepicker",
"video",
"excel-table",
"excel-chart",
"paste-from-server",
"QaSpecialChar",
"ckeditor_wiris_formulaEditor"
]
},
{
"id": "review",
"label": "Review",
"type": "main",
"mode": "any",
"items": [
"addComment",
"deleteComment",
"showHideComment",
"previousComment",
"nextComment",
"Tracking",
"Highlighting",
"PreviousChange",
"NextChange",
"AcceptAndMove",
"RejectAndMove",
"Accept",
"Reject",
"AcceptAllChanges",
"RejectAllChanges",
"ProofReader"
]
},
{
"id": "references",
"label": "References",
"mode": "any",
"items": [
"attachment",
"qalink",
"xref",
"updatexref",
"update-all-xref",
"-",
"FootNote",
"EndNote",
"Citation",
"citation-from-server",
"table-notes",
"section-notes",
"-",
"edit-block",
"save-block-component",
"save-close-block-component",
"cancel-checkout-block-component",
"refresh",
"removereference",
"pin-component-reference",
"unpin-component-reference",
"remove-component-reference"
]
},
{
"id": "table",
"label": "Table",
"mode": "edit",
"items": [
"TableTypes",
"create-table-component",
"replace-table-from-server",
"insert-table-title",
"insert-table-description",
"add-para-after-table",
"insert-row-before",
"insert-row-after",
"insert-column-left",
"insert-column-right",
"split-cells-horizontal",
"split-cells-vertical",
"merge-cells",
"row-delete",
"column-delete",
"delete-table",
"BGColor",
"TextColor",
"data-source"
]
},
{
"id": "region",
"label": "Region",
"mode": "any",
"items": [
"RegionTypes",
"create-region-component",
"insert-region-title",
"insert-para-after-region",
"replace-region-from-server",
"remove-region"
]
}
]
},
"notesPane": [
"refresh",
"FootNote",
"EndNote",
"Citation",
"table-notes",
"section-notes",
"delete"
],
"features": {
"metapane": {
"metaConfigs": [
{
"metaconfig": {
"name": "di-display-columns",
"priority": "560",
"sort": "ASC",
"component": {
"name": "DomainValuePicker",
"valueField": "name",
"params": {
"domainName": "Display Column Names"
}
}
}
},
{
"metaconfig": {
"name": "di-column-type",
"priority": "560",
"sort": "ASC",
"component": {
"name": "DomainValuePicker",
"valueField": "name",
"params": {
"domainName": "Display Column Names"
}
}
}
},
{
"metaconfig": {
"name": "di-master-table",
"component": {
"name": "AssetPicker",
"params": {
"filter": "STRUCTURED_TABLE_BROWSER"
}
}
}
},
{
"metaconfig": {
"name": "di-row-type",
"priority": "560",
"sort": "ASC",
"component": {
"name": "DomainValuePicker",
"valueField": "name",
"params": {
"domainName": "Row Types"
}
}
}
},
{
"metaconfig": {
"component": {
"name": "DomainValuePicker",
"params": {
"domainName": "DC Master Pages"
},
"valueField": "name"
},
"name": "sys-dc-a-all-pages",
"priority": "562",
"sort": "ASC"
}
},
{
"metaconfig": {
"component": {
"name": "DomainValuePicker",
"params": {
"domainName": "DC Master Pages"
},
"valueField": "name"
},
"name": "sys-dc-a-first-page",
"priority": "562",
"sort": "ASC"
}
},
{
"metaconfig": {
"component": {
"name": "DomainValuePicker",
"params": {
"domainName": "DC Master Pages"
},
"valueField": "name"
},
"name": "sys-dc-a-last-page",
"priority": "562",
"sort": "ASC"
}
},
{
"metaconfig": {
"component": {
"name": "DomainValuePicker",
"params": {
"domainName": "DC Master Pages"
},
"valueField": "name"
},
"name": "sys-dc-a-blank-page",
"priority": "562",
"sort": "ASC"
}
},
{
"metaconfig": {
"component": {
"name": "DomainValuePicker",
"params": {
"domainName": "DC Colors"
},
"valueField": "name"
},
"name": "sys-dc-a-title-color",
"priority": "562",
"sort": "ASC"
}
},
{
"metaconfig": {
"component": {
"name": "DomainValuePicker",
"params": {
"domainName": "DC Colors"
},
"valueField": "name"
},
"name": "sys-dc-a-box-color",
"priority": "562",
"sort": "ASC"
}
},
{
"metaconfig": {
"component": {
"name": "DomainValuePicker",
"params": {
"domainName": "DC Style Sheets"
},
"valueField": "name"
},
"name": "sys-dc-a-stylesheet",
"priority": "562",
"sort": "ASC"
}
},
{
"metaconfig": {
"component": {
"name": "DomainValuePicker",
"params": {
"domainName": "DC Columns"
},
"valueField": "name"
},
"name": "sys-dc-a-number-of-columns",
"priority": "562",
"sort": "ASC"
}
},
{
"metaconfig": {
"component": {
"name": "DomainValuePicker",
"params": {
"domainName": "DC Span Split"
},
"valueField": "name"
},
"name": "sys-dc-a-span-or-split",
"priority": "562",
"sort": "ASC"
}
},
{
"metaconfig": {
"component": {
"name": "DomainValuePicker",
"params": {
"domainName": "DC Horizontal Spacing"
},
"valueField": "name"
},
"name": "sys-dc-a-horizontal-spacing",
"priority": "562",
"sort": "ASC"
}
},
{
"metaconfig": {
"component": {
"name": "DomainValuePicker",
"params": {
"domainName": "DC Table Styles"
},
"valueField": "name"
},
"name": "sys-dc-a-table-style",
"priority": "562",
"sort": "ASC"
}
},
{
"metaconfig": {
"component": {
"name": "DomainValuePicker",
"params": {
"domainName": "DC Table Text Alignment"
},
"valueField": "name"
},
"name": "sys-dc-a-text-alignment",
"priority": "562",
"sort": "ASC"
}
},
{
"metaconfig": {
"component": {
"name": "DomainValuePicker",
"params": {
"domainName": "DC End On"
},
"valueField": "name"
},
"name": "sys-dc-a-end-on",
"priority": "562",
"sort": "ASC"
}
},
{
"metaconfig": {
"component": {
"name": "DomainValuePicker",
"params": {
"domainName": "DC Character Style Sheet"
},
"valueField": "name"
},
"name": "sys-dc-a-character-stylesheet",
"priority": "562",
"sort": "ASC"
}
},
{
"metaconfig": {
"component": {
"name": "DomainValuePicker",
"params": {
"domainName": "DC Break"
},
"valueField": "name"
},
"name": "sys-dc-a-break",
"priority": "562",
"sort": "ASC"
}
},
{
"metaconfig": {
"component": {
"name": "DomainValuePicker",
"params": {
"domainName": "DC Position"
},
"valueField": "name"
},
"name": "sys-dc-a-position",
"priority": "562",
"sort": "ASC"
}
},
{
"metaconfig": {
"component": {
"name": "DomainValuePicker",
"params": {
"domainName": "DC Colors"
},
"valueField": "name"
},
"name": "sys-dc-a-color",
"priority": "562",
"sort": "ASC"
}
},
{
"metaconfig": {
"component": {
"name": "DomainValuePicker",
"params": {
"domainName": "Units"
},
"valueField": "name"
},
"name": "sys-dc-a-unit",
"priority": "562",
"sort": "ASC"
}
},
{
"metaconfig": {
"endpoint": {
"serializeField": "id",
"url": "/components/api/v1/contenttypeservice/getContentTypePublishingChannels?sortBy=position&order=ASC",
"valueField": "displayName"
},
"name": "sys-dc-a-channel-name",
"priority": "562"
}
},
{
"metaconfig": {
"component": {
"name": "AssetPicker",
"params": {
"filter": "PICTURE_BROWSER"
}
},
"name": "sys-var-a-background-image",
"priority": "562"
}
}
]
}
},
"blockburstingconfig" : {
"burstingrules" : [ {
"contentType" : "Smart Citation",
"selectors" : [ {
"elementName" : "note",
"elementType" : "citation"
} ],
"assetBrowserId" : "CITATION_BROWSER"
}, {
"contentType" : "Journal Article",
"selectors" : [ {
"elementName" : "note",
"elementType" : "citation",
"elementSubType" : "journal-article"
} ],
"assetBrowserId" : "JOURNAL_ARTICLE_BROWSER"
}, {
"contentType" : "Personal Communication",
"selectors" : [ {
"elementName" : "note",
"elementType" : "citation",
"elementSubType" : "personal-communication"
} ],
"assetBrowserId" : "PERSONAL_COMMUNICATION_BROWSER"
}, {
"contentType" : "Web Page",
"selectors" : [ {
"elementName" : "note",
"elementType" : "citation",
"elementSubType" : "web-page"
} ],
"assetBrowserId" : "WEB_PAGE_BROWSER"
}, {
"contentType" : "Government Document",
"selectors" : [ {
"elementName" : "note",
"elementType" : "citation",
"elementSubType" : "government-document"
} ],
"assetBrowserId" : "GOVERNMENT_DOCUMENT_BROWSER"
}, {
"contentType" : "Press Release",
"selectors" : [ {
"elementName" : "note",
"elementType" : "citation",
"elementSubType" : "press-release"
} ],
"assetBrowserId" : "PRESS_RELEASE_BROWSER"
}, {
"contentType" : "Conference Proceedings",
"selectors" : [ {
"elementName" : "note",
"elementType" : "citation",
"elementSubType" : "conference-proceedings"
} ],
"assetBrowserId" : "CONFERENCE_PROCEEDINGS_BROWSER"
}]
}
}
Hide a Toolbar or Items from Ribbon
To perform the following action, you need to make changes in any of these two files
- S3/qaservice/conf/qa-config.json
- S3/qaservice/conf/structure/Smart Document/qa-config.json
{
"toolbar": {
"mainTabs": [
{
"id": "home",
"label": "Home",
"type": "main",
"mode": "any",
"items": [
"ParaStyles" //This configuration enables only Paragraph styles and Home tab. You can also add or remove toolbar tabs or items from ribbon through this configuration.
]
}
]
}
}
Specify Note Types and Buttons in the Notes Pane
To perform the following action, you need to make changes in any of these two files
- S3/qaservice/conf/qa-config.json
- S3/qaservice/conf/structure/Smart Document/qa-config.json
{
"notesPane": [
"refresh",
"FootNote",
"EndNote",
"Citation",
"table-notes", //Remove any entry from this list to hide that item from notes pane.
"section-notes",
"delete"
]
}
Specify Section Bursting Rules
To perform the following action, you need to make changes in any of these two files
- S3/qaservice/conf/qa-config.json
- S3/qaservice/conf/structure/Smart Document/qa-config.json
{
"sectionburstingconfig": {
"burstingrules": [
{
"contentType": "Smart Section",
"sectionTypePath": "/document/section",
"assetBrowserId": "SMART_SECTION_BROWSER"
}
]
}
}
Specify Block Bursting Rules
To perform the following action, you need to make changes in any of these two files
- S3/qaservice/conf/qa-config.json
- S3/qaservice/conf/structure/Smart Document/qa-config.json
{
"blockburstingconfig": {
"burstingrules": [
{
"contentType": "Box",
"assetBrowserId": "BOX_BROWSER",
"selectors": [
{
"elementName": "region",
"elementType": "box"
}
]
},
{
"contentType": "Smart Table",
"assetBrowserId": "STRUCTURED_TABLE_BROWSER",
"selectors": [
{
"elementName": "table"
}
]
}
]
}
}
Specify Default Proofreading Language
To perform the following action, you need to make changes in any of these two files
- S3/qaservice/conf/qa-config.json
- S3/qaservice/conf/structure/Smart Document/qa-config.json
{
"editorconfigs": {
"ckeditorconfigs": [
{
"name": "proofreader_defaultLanguage",
"value": "en-US"
}
]
}
}
Auto Start-up for Proofreading
To perform the following action, you need to make changes in any of these two files
- S3/qaservice/conf/qa-config.json
- S3/qaservice/conf/structure/Smart Document/qa-config.json
{
"editorconfigs": {
"ckeditorconfigs": [
{
"name": "proofreader_autoStartup",
"value": false //Default value is true. Set to false to disable auto startup for proofreading.
}
]
}
}
Auto Start-up for Tracking
To perform the following action, you need to make changes in any of these two files
- S3/qaservice/conf/qa-config.json
- S3/qaservice/conf/structure/Smart Document/qa-config.json
{
"editorconfigs": {
"ckeditorconfigs": [
{
"name": "tracking_autoStartup",
"value": true //Default value is false. Set to true to enable auto startup for tracking.
}
]
}
}
Enable DOM Optimization while Inserting Table from Excel
To perform the following action, you need to make changes in any of these two files
- S3/qaservice/conf/qa-config.json
- S3/qaservice/conf/structure/Smart Document/qa-config.json
{
"editorconfigs": {
"ckeditorconfigs": [
{
"name": "reference_enableDOMOptimization ",
"value": true //Default value is false. Set to true to enable DOM optimization.
}
]
}
}
Specify Minimum Number of Rows to Display on Canvas When DOM Optimization Is Enabled
To perform the following action, you need to make changes in any of these two files
- S3/qaservice/conf/qa-config.json
- S3/qaservice/conf/structure/Smart Document/qa-config.json
{
"editorconfigs": {
"ckeditorconfigs": [
{
"name": "reference_minimumPlaceholderRows",
"value": “10”
}
]
}
}
Hide Default Panes
To perform the following action, you need to make changes in any of these two files
- S3/qaservice/conf/qa-config.json
- S3/qaservice/conf/structure/Smart Document/qa-config.json
{
"panes": [
"preview",
"trackChanges",
"notes",
"comments",
"properties", //Remove any pane from this list to hide it in quark author
"history",
"link",
"workflow",
"statistics",
"navigation"
]
}
Check-in an Asset to Default Collection
To perform the following action, you need to make changes in any of these two files
- S3/qaservice/conf/qa-config.json
- S3/qaservice/conf/structure/Smart Document/qa-config.json
{
"features": {
"attributemappings": {
"attributemapping": [
{
"contentType": "Smart Citation",
"attributes": [
{
"name": "Collection Path",
"value": "Home/Parent/Child",
"indexingOption": "INITIAL_VERSION"
}
]
}
]
}
}
}
Map a Widget for a bodydiv
To perform the following action, you need to make changes in any of these two files
- S3/qaservice/conf/qa-config.json
- S3/qaservice/conf/structure/Smart Document/qa-config.json
{
"editorconfigs": {
"ckeditorconfigs": [
{
"name": "canvas_WidgetToBodydivMapping",
"value": [
{
"widgetName": "custom-figure",
"bodydivType": "custom-figure" //custom plugin
}
]
}
]
}
}
Maintain Style while Copy-pasting Table from Excel
To perform the following action, you need to make changes in any of these two files
- S3/qaservice/conf/qa-config.json
- S3/qaservice/conf/structure/Smart Document/qa-config.json
{
"editorconfigs": {
"ckeditorconfigs": [
{
"name": "excel_maintainStyleOnPaste",
"value": false //Default value is true. Set to false to remove styling while copy pasting content from excel.
}
]
}
}
Specify Changes in Meta Pane for Meta
To perform the following action, you need to make changes in any of these two files
- S3/qaservice/conf/qa-config.json
- S3/qaservice/conf/structure/Smart Document/qa-config.json
{
"features": {
"metapane": {
"metaConfigs": [
{
"metaconfig": {
"name": "lang",
"selectors": [
{
"element": "section", // Defines the element for which configuration will be applied
"elementType": "section", // Defines the type of element for which configuration will be applied
"sectionTypePath": "/document/section" // Defines the section path in which configuration while pe applied
"parentMetaHierarchy: "", // Defines the hierarchical path of the meta data. Example: "parentMeta1/parentMeta2
"mandatory": true, //Default is false. Set to true to validate a meta value while saving document.
"hidden": false, //Default is false. Set to true to hide a meta at particular location in document.
}
]
}
}
]
}
}
}
Specify Changes in Meta Pane for Meta Attribute Mapping
To perform the following action, you need to make changes in any of these two files
- S3/qaservice/conf/qa-config.json
- S3/qaservice/conf/structure/Smart Document/qa-config.json
Note: This will only works for document level attributes.
{
"features": {
"metapane": {
"metaConfigs": [
{
"metaconfig": {
"name": "Region",
"selectors": [
{
"element": "section",
"elementType": "section",
"sectionTypePath": "/document"
"parentMetaHierarchy": "",
"attributeConfig": { // Specify attibute configuration here
"name" : "RegionList",
"bidirectional": true, // Open document attribute value will be set to meta
"indexingOption": "INITIAL_VERSION" or "ALL_VERSIONS"
}
}
]
}
}
]
}
}
}
Configuration for applying quarky keywords to custom meta
To perform the following action, you need to make changes in any of these two files
- S3/qaservice/conf/qa-config.json
- S3/qaservice/conf/structure/Smart Document/qa-config.json
{
"features": {
"metapane": {
"metaConfigs": [
{
"metaconfig": {
"name": "lang",
"mapKeywords": true
}
}
]
}
}
}
The custom meta should be of type “attrib-multivalue” so that multiple values can be applied to it.
Configure Asset picker, Domain value picker, Block picker for meta
Asset picker
To perform the following action, you need to make changes in any of these two files
- S3/qaservice/conf/qa-config.json
- S3/qaservice/conf/structure/Smart Document/qa-config.json
{
"features": {
"metapane": {
"metaConfigs": [
{
"metaconfig": {
"name": "di-master-table",
"component": {
"name": "AssetPicker",
"params": {
"filter": "STRUCTURED_TABLE_BROWSER"
}
}
}
}
]
}
}
}
Domain value picker
To perform the following action, you need to make changes in any of these two files
- S3/qaservice/conf/qa-config.json
- S3/qaservice/conf/structure/Smart Document/qa-config.json
{
"features": {
"metapane": {
"metaConfigs": [
{
"metaconfig": {
"name": "di-row-type",
"priority": "560",
"sort": "ASC",
"component": {
"name": "DomainValuePicker",
"valueField": "name",
"params": {
"domainName": "Row Types"
}
}
}
}
]
}
}
}
Block picker
To perform the following action, you need to make changes in any of these two files
- S3/qaservice/conf/qa-config.json
- S3/qaservice/conf/structure/Smart Document/qa-config.json
{
"features": {
"metapane": {
"metaConfigs": [
{
"metaconfig": {
"name": "selectStep",
"component": {
"name": "BlockPicker"
}
}
}
]
}
}
}
Configure External Cross Reference
To perform the following action, you need to make changes in any of these two files:
- S3/qaservice/conf/qa-config.json
- S3/qaservice/conf/structure/Smart Document/qa-config.json
Use this configuration to define the asset browser used when inserting external cross references into a document.
{
"features": {
"externalCrossReferenceConfig": {
"assetBrowserID": "SMART_DOCUMENT_BROWSER" // Specify the browser ID for external cross references
}
}
}