Api
Top level api object from which all other api modules are available.
Properties
Name | Type | Description |
article |
| Required - See Article |
document | Required - See Document | |
newsItem |
| Required - See NewsItem |
events | Required - See Events | |
router | Required - See Router | |
browser |
| Required - See Browser |
ui |
| Required - See Ui |
upload |
| Required - See Upload |
settings |
| Required - See Settings |
user |
| Required - See User |
history |
| Required - |
stateHandler |
| Required - Reference to a StateHandler |
editorSession |
| Required - Substance editorSession |
doc |
| Required - The editorSession document |
getVersion() ⇒ string
string
Get current version of the Writer
Returns: string
- Version tag
getConfigValue(id, path, defaultValue) ⇒ *
*
Get configuration value in a plugins local configuration data section. If no path is given the full configuration object for the plugin instance is returned.
Returns: *
- The value of the wanted configuration path or default value
Parameters
Param | Type | Description |
id |
| Required - Plugin id to fetch configuration value for |
path |
| Required - Optional configuration path in the data section |
defaultValue |
| Required - Optional default value if no value is found |
Example
Example
hasLocalConfiguration() ⇒ Boolean
Boolean
Check if the configuration has been overridden with local configuration
getPluginModule(moduleId) ⇒ Object
Object
Return a fresh instance of a specific plugin provided module
Parameters
Param | Type | Description |
moduleId |
| Required - Module id |
getPluginModulesForTarget(targetId)
Get modules targeted at a specific consumer
Parameters
Param | Type | Description |
targetId |
| Required - Target id of the consumer |
Last updated