docs: update content, see #103

This commit is contained in:
Hans Pagel 2021-01-28 12:21:12 +01:00
parent a7b0229d23
commit b5df7b40dc

View File

@ -21,7 +21,11 @@ new Editor({
})
```
If you dont pass an element, tiptap will create an invisible `<div>`. You can use that to mount your editor after its already initiated: `yourElement.append(editor.options.element)`
You can even initiate your editor before mounting it to an element. This is useful when your DOM is not yet available. Just leave out the `element`, well create one for you. Append it to your container at a later date like that:
```js
yourContainerElement.append(editor.options.element)
```
### Extensions
Its required to pass a list of extensions to the `extensions` property, even if you only want to allow paragraphs.