Bridge.Editable
.get(key)
Return the editable value belonging to key.
This is specially designed for user editable values, so those added in a preso.
If a value has not been set yet by the user (the default value is shown), null
is returned.
note
Any use of this command in a non prep/present context will return a null value.
<h2
data-editable="my-editable-area"
data-companywide-editable="my-global-value"
>
Default Value
</h2>
Bridge.Editable.get("my-editable-area");
Bridge.Editable.get("my-global-value");
.getSlideValues()
Returns an array of all editable data keys and their existing values for the current slide.
const values = Bridge.Editable.getSlideValues();
.getSlideKeys()
Returns an array of all keys from the editable fields (data-editable) on the current slide.
const keys = Bridge.Editable.getSlideKeys();
.getWithKey(key, [defaultValue])
Returns the key and value for a specific editable data key.
| Parameter | Type | Description |
|---|---|---|
| key | String | The editable data key |
| defaultValue | Any | Value to return if no data is found |
Returns:
Returns an object: { key: "...", value: "..." }.
const item = Bridge.Editable.getWithKey("my-key", "Default Content");
.getWithKeys(keys)
Takes an array of data keys and returns an array of value objects for those keys.
| Parameter | Type | Description |
|---|---|---|
| keys | Array | Array of editable data keys |
const items = Bridge.Editable.getWithKeys(["key1", "key2"]);