This key defines the key that a user in CloudCannon will see when editing this value.
This key will also be used if you want to specify any input configuration using _inputs.
If no source_key is set, this key will also be assumed to be the source key.
Appears in
└── Snippet Model
└── editor_keyType
string
Examples
Copied to clipboard
parser: key_values
options:
models:
- editor_key: href
- editor_key: class
- editor_key: target{
"parser": "key_values",
"options": {
"models": [
{
"editor_key": "href"
},
{
"editor_key": "class"
},
{
"editor_key": "target"
}
]
}
}Key/value models can be specified in any order, so do not have to match the order of they keys in the source code.
Example usage:
Markdown
Copied to clipboard
## My blog post
<a href="#link" target="_blank" class="my_link"> ... </a>
Morbi leo risus, porta ac consectetur ac, vestibulum at eros.When edited in CloudCannon, this will edit as the data model:
Copied to clipboard
href: '#link'
target: _blank
class: my_link{
"href": "#link",
"target": "_blank",
"class": "my_link"
}