mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACA-1889] Split Extending section into separate files (#784)
* [ACA-1889] Split Extending section into separate files * [ACA-1889] Split Extending section into separate files * [ACA-1889] Added recent changes and then deleted extending.md * [ACA-1889] Added Tutorials section
This commit is contained in:
55
docs/extending/actions.md
Normal file
55
docs/extending/actions.md
Normal file
@@ -0,0 +1,55 @@
|
||||
---
|
||||
---
|
||||
|
||||
# Actions
|
||||
|
||||
| Name | Description |
|
||||
| -- | -- |
|
||||
| **id** | Unique identifier. |
|
||||
| **type** | Action type, see [Application Actions](/extending/application-actions) for more details. |
|
||||
| **payload** | Action payload, a string containing value or expression. |
|
||||
|
||||
```json
|
||||
{
|
||||
"$schema": "../../../extension.schema.json",
|
||||
"$version": "1.0.0",
|
||||
"$name": "plugin1",
|
||||
|
||||
"actions": [
|
||||
{
|
||||
"id": "plugin1.actions.settings",
|
||||
"type": "NAVIGATE_URL",
|
||||
"payload": "/settings"
|
||||
},
|
||||
{
|
||||
"id": "plugin1.actions.info",
|
||||
"type": "SNACKBAR_INFO",
|
||||
"payload": "I'm a nice little popup raised by extension."
|
||||
},
|
||||
{
|
||||
"id": "plugin1.actions.node-name",
|
||||
"type": "SNACKBAR_INFO",
|
||||
"payload": "$('Action for ' + context.selection.first.entry.name)"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Value expressions
|
||||
|
||||
You can use light-weight expression syntax to provide custom parameters for the action payloads.
|
||||
|
||||
```text
|
||||
$(<expression>)
|
||||
```
|
||||
|
||||
Expressions are valid JavaScript blocks that evaluate to values.
|
||||
|
||||
Examples:
|
||||
|
||||
```text
|
||||
$('hello world') // 'hello world'
|
||||
$('hello' + ', ' + 'world') // 'hello, world'
|
||||
$(1 + 1) // 2
|
||||
$([1, 2, 1 + 2]) // [1, 2, 3]
|
||||
```
|
Reference in New Issue
Block a user