From a7b0229d234bcbc772b08e991d399aea92715c71 Mon Sep 17 00:00:00 2001 From: Hans Pagel Date: Thu, 28 Jan 2021 12:11:38 +0100 Subject: [PATCH 1/3] docs: update the collaborative editing example --- .../Examples/CollaborativeEditing/index.vue | 27 +++++++++---------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/docs/src/demos/Examples/CollaborativeEditing/index.vue b/docs/src/demos/Examples/CollaborativeEditing/index.vue index 520b9682..2070962f 100644 --- a/docs/src/demos/Examples/CollaborativeEditing/index.vue +++ b/docs/src/demos/Examples/CollaborativeEditing/index.vue @@ -5,18 +5,16 @@
- {{ status }} +
-
+
-
@@ -172,21 +170,20 @@ export default { justify-content: space-between; flex-wrap: wrap; white-space: nowrap; - padding: 0.25rem 0 0.25rem 0.25rem; border-top: 1px solid rgba(black, 0.1); + font-size: 13px; + font-weight: 500; + color: rgba(black, 0.5); + white-space: nowrap; + padding: 0.25rem 0.75rem; } /* Some information about the status */ &__status { display: flex; align-items: center; - font-size: 13px; - font-weight: 500; border-radius: 5px; margin-top: 1rem; - padding: 0.25rem 0.5rem; - color: rgba(black, 0.5); - white-space: nowrap; &::before { content: ' '; @@ -200,7 +197,7 @@ export default { } &--connecting::before { - background: #FD9170; + background: #616161; } &--connected::before { @@ -208,7 +205,7 @@ export default { } } - &__actions { + &__name { button { background: none; border: none; From b5df7b40dc462240dc7813396925f02858e3f794 Mon Sep 17 00:00:00 2001 From: Hans Pagel Date: Thu, 28 Jan 2021 12:21:12 +0100 Subject: [PATCH 2/3] 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 32747e9c..950980b2 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. From 416225174a39ce40a0d7613bef1390e1bd1d67cc Mon Sep 17 00:00:00 2001 From: Hans Pagel Date: Fri, 29 Jan 2021 15:16:52 +0100 Subject: [PATCH 3/3] docs: update links to api concept, fix #121 --- docs/src/docPages/api/commands.md | 2 +- docs/src/links.yaml | 2 +- docs/static/_redirects | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/src/docPages/api/commands.md b/docs/src/docPages/api/commands.md index 0103e3f0..439c8aaa 100644 --- a/docs/src/docPages/api/commands.md +++ b/docs/src/docPages/api/commands.md @@ -71,7 +71,7 @@ Both calls would return `true` if it’s possible to apply the commands, and `fa In order to make that work with your custom commands, don’t forget to return `true` or `false`. -For some of your own commands, you probably want to work with the raw [transaction](/api/overview). To make them work with `.can()` you should check if the transaction should be dispatched. Here is how we do that within `.insertText()`: +For some of your own commands, you probably want to work with the raw [transaction](/api/concept). To make them work with `.can()` you should check if the transaction should be dispatched. Here is how we do that within `.insertText()`: ```js export default (value: string): Command => ({ tr, dispatch }) => { diff --git a/docs/src/links.yaml b/docs/src/links.yaml index dbabf680..0c547d71 100644 --- a/docs/src/links.yaml +++ b/docs/src/links.yaml @@ -106,7 +106,7 @@ - title: API items: - title: Concept - link: /api/overview + link: /api/concept - title: Editor link: /api/editor - title: Commands diff --git a/docs/static/_redirects b/docs/static/_redirects index 1138e57d..b66aa4ea 100644 --- a/docs/static/_redirects +++ b/docs/static/_redirects @@ -1,4 +1,4 @@ /overview / /examples /examples/basic /guide /guide/get-started -/api /api/overview +/api /api/concept