Quark Author Configuration files
To configure Quark Author, make changes in the following configuration files:
- S3/qaservice/conf/app-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
In the file app-config.json, you can make the following common configurations:
- Map a Query for Document Templates
- Show/Hide Template Meta while Initiating Document
- Show/Hide a Document Content Type in New Document Menu
- Enable Older Versions Selection of an Asset in the Asset Picker Dialog
- Configure Action Buttons (Save, Discard and Done Editing)
Map a Query for Document Templates
{
"documenttemplate": [
{
"contenttype": "Document Content Type",
"templatequery": " Starter Documents” //Shared query name saved in workspace for templates.
}
]
}
Show/Hide Template Meta while Initiating Document
{
"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
{
"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
{
"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)
{
"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
In the file qa-config.json, you can make the following common configurations:
- Hide a Toolbar or Items from Ribbon
- Specify Note Types and Buttons in the Notes Pane
- Specify Section Bursting Rules
- Specify Block Bursting Rules
- Specify Default Proofreading Language
- Auto Start-up Proofreading
- Auto Start-up Tracking
- Enable DOM Optimization while Inserting Table from Excel
- Specify Minimum Number of Rows to Display on Canvas When DOM Optimization Is Enabled
- Hide Default Panes
- Check-in an Asset to Default Collection
- Map a Widget for a bodydiv
- Maintain Style while Copy-pasting Table from Excel
- Specify Changes in Meta Pane for Meta
Hide a Toolbar or Items from Ribbon
"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
"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
"sectionburstingconfig": {
"burstingrules": [
{
"contentType": "Smart Section",
"sectionTypePath": "/document/section",
"assetBrowserId": "SMART_SECTION_BROWSER"
}
]
}
Specify Block Bursting Rules
"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
"editorconfigs": {
"ckeditorconfigs": [
{
"name": "proofreader_defaultLanguage",
"value": "en-US"
}
]
}
Auto Start-up for Proofreading
"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
"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
"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
"editorconfigs": {
"ckeditorconfigs": [
{
"name": "reference_minimumPlaceholderRows",
"value": “10”
}
]
}
Hide Default Panes
"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
"features": {
"attributemappings": {
"attributemapping": [
{
"contentType": "Smart Citation",
"attributes": [
{
"name": "Collection Path",
"value": "Home/Parent/Child",
"indexingOption": "INITIAL_VERSION"
}
]
}
]
}
}
Map a Widget for a bodydiv
"editorconfigs": {
"ckeditorconfigs": [
{
"name": "canvas_WidgetToBodydivMapping",
"value": [
{
"widgetName": "custom-figure",
"bodydivType": "custom-figure" //custom plugin
}
]
}
]
}
Maintain Style while Copy-pasting Table from Excel
"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
"features": {
"metapane": {
"metaConfigs": [
{
"metaconfig": {
"name": "lang",
"displayfilters": [
{
"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.
"selectors": [
{
"element": "section",
"elementType": "section",
"sectionTypePath": "/document/section"
}
]
}
]
}
}
]
}
}