Option Documentation

Congree.Sidebar

The following options are available when initializing the Congree Sidebar:

Option


Description

Values

serverAddress

This is the address at which the Congree Bulk Check Service is available.


authentication


This is the authentication configuration. It is an object whose structure is described below.see table Authentication configuration object
initialLanguage
The two letter iso code of the language that the user interface should be shown in.
  • "de"
  • "en"
editors

(Optional, but strongly recommended)

This is an array of editor adapters for the editor elements that CWI should work with. If it is not specified, CWI shows its own editor.


An editor adapter is a class that specifies how CWI needs to interact with the editor.

Congree currently provides adapters for the following editors: see "values"

Usage is like this:
Congree.AdapterFor.<editor name>(<CSS Selector>, <editor name>)
The CSS selector that is passed as the argument is a specification for which editors CWI should connect to.
For example, you could have a configuration like so:
...,
editors: [Congree.AdapterFor.TextInput('textarea')],
...
This would connect CWI to all textarea elements on the page - no matter when they appear. As soon as a new textarea element is added
to the page, CWI will connect to it.


The second parameter "editor name" is optional. It will be used as the name of the editor when transmitting the text to the Congree
backend. It can be used to provide context to the checked text. This context can in turn be used to configure different rules for different
editors. As this name will be used directly in XML, it needs to be a valid as an XML tag name. So, basically only alphanumerical characters,
where the first character must not be a number.

  • "TextInput": This is used for normal text input controls like <input type="text"> and <textarea>.
  • "TinyMce3": This is used for TinyMCE editors of version 3. Confluence currently uses this version of the TinyMCE editor
  • "TinyMce4": This is used for TinyMCE editors of version 4.
  • "CKEditor4": This is used for CKEditor editors of version 4.
requestValidTerms
This option triggers to display valid terms or not. Possible values are true or false.
editorElementIds

(Warnung) This option is outdated, please do not use it anymore

This is an array of the IDs of the editor elements that CWI works with. Optional. If not specified, CWI shows its own editor.


initialRuleSetName

This is the rule set that should be displayed by default.


bulkCheckServicePath

This lets you specify a different URL for the Bulk Check Service (CongreeBulkCheckService/BulkCheckService.svc) if you cannot use the default one.

Contact Congree before using this.


Authentication configuration object

OptionDescription
loginType

Specifies how the user is logged in. Possible values are:

  • "cms"
  • "usernamePassword"
servicePath (Optional)Specifies the path to the authentication service. If loginType is "usernamePassword" this
should be the same as bulkCheckServicePath. If loginType is "cms" this should point to the
authentication service of the Congree Bulk Check Service. If this is not specified, it will default to:
  • loginType = "cms": CongreeBulkCheckService/BulkCheckAuthenticationService.svc
  • loginType = "usernamePassword": CongreeBulkCheckService/BulkCheckService.svc
userNameThe username to log in
passwordThis is the password for the Congree user. Only for loginType = "usernamePassword"
thirdPartySystemsIdentifierThe identifier of the system. Default: "CWI". Only for loginType = "cms"
accessTokenURLThe URL of the Congree Identity Server. Here the CWI gets the token for REST API requests.

Congree.Sidebar.show

This method is only relevant in the Fixed display mode.

The show function on the sidebar object requires one parameter: The ID of the div element that will contain the Congree Sidebar.

Congree.Sidebar.asOverlay

This method is only relevant in the Overlay display mode.

The following options are available when calling asOverlay on the sidebar object:

Option

Description

overlayPosition

The position of the overlay. Can be "right" or "left"

Congree.Sidebar.logout

This JS function can be used to logout the current user programmatically.