Merge branch 'main' of github.com:ueberdosis/tiptap

# Bitte geben Sie eine Commit-Beschreibung ein, um zu erklären, warum dieser
# Merge erforderlich ist, insbesondere wenn es einen aktualisierten
# Upstream-Branch mit einem Thema-Branch zusammenführt.
#
# Zeilen, die mit '#' beginnen, werden ignoriert,
# und eine leere Beschreibung bricht den Commit ab.
This commit is contained in:
Hans Pagel
2021-06-03 09:38:01 +02:00
21 changed files with 452 additions and 85 deletions

View File

@@ -0,0 +1,21 @@
# 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](https://prosemirror.net/docs/ref/#state.Transaction.getMeta).
`value: any`
Store any value within your metadata.
## Usage
```js
// 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')
```

View File

@@ -2,9 +2,6 @@
⚠️ Experiment
## Known issues
* Dragging should move the image, but duplicates it
## Tasks
* Add the caption as an optional parameter to the command
* Build commands to wrap an image into a figure + figcaption?