mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-24 17:47:50 +08:00
549 B
549 B
setMeta
Store a metadata property in the current transaction.
Parameters
key: string
The name of your metadata. You can get its value at any time with getMeta.
value: any
Store any value within your metadata.
Usage
// Prevent the update event from being triggered
editor.commands.setMeta('preventUpdate', true)
// Store any value in the current transaction.
// You can get this value at any time with tr.getMeta('foo').
editor.commands.setMeta('foo', 'bar')