- Description:
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_keyis set, this key will also be assumed to be the source key.- Appears in:
└── Snippet Model └── editor_key- Type:
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:
MarkdownCopied 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 clipboardhref: '#link' target: _blank class: my_link{ "href": "#link", "target": "_blank", "class": "my_link" }