Base class for anything on a Lucid document that has an ID and properties.
Extended by
Constructors
new PropertyStoreProxy()
new PropertyStoreProxy(id, client): PropertyStoreProxyParameters
| Parameter | Type | Description |
|---|---|---|
id | string | ID of this element |
client | EditorClient |
Returns
Properties
client
protected readonly client: EditorClient;id
readonly id: string;ID of this element
properties
readonly properties: WriteableMapProxy<string, UnsafeJsonSerializableOrUndefined, void, UnsafeJsonSerializableOrUndefined>;All properties available on this element, organized by name.
Not all properties are writeable (e.g. "ClassName" on a block).
To move or resize elements, use setLocation() or setBoundingBox() or offset() instead.
For text area properties, properties.get('Text') returns plain text. To get or set rich text
with inline formatting (bold, italic, links, line spacing), use the Rich: prefix:
properties.get('Rich:Text') returns {t: string, m: Array} with text and markup, and
properties.set('Rich:Text', {t: 'hello', m: [{s: 0, e: 5, n: 'b', v: true}]}) sets
bold text. This works with any text area name (e.g. 'Rich:Title', 'Rich:Cell_0,1').