From b5df7b40dc462240dc7813396925f02858e3f794 Mon Sep 17 00:00:00 2001 From: Hans Pagel Date: Thu, 28 Jan 2021 12:21:12 +0100 Subject: [PATCH] docs: update content, see #103 --- docs/src/docPages/api/editor.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/src/docPages/api/editor.md b/docs/src/docPages/api/editor.md index 32747e9cc..950980b2a 100644 --- a/docs/src/docPages/api/editor.md +++ b/docs/src/docPages/api/editor.md @@ -21,7 +21,11 @@ new Editor({ }) ``` -If you don’t pass an element, tiptap will create an invisible `
`. You can use that to mount your editor after it’s 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`, we’ll create one for you. Append it to your container at a later date like that: + +```js +yourContainerElement.append(editor.options.element) +``` ### Extensions It’s required to pass a list of extensions to the `extensions` property, even if you only want to allow paragraphs.