From 4ed07ba87e7c8daf8a944f856824212c0634d9c2 Mon Sep 17 00:00:00 2001 From: Hans Pagel Date: Mon, 2 Nov 2020 15:54:15 +0100 Subject: [PATCH] move nodes and marks to a separate folder, add missing extensions --- .../api/extensions/code-block-highlight.md | 11 -- .../src/docPages/api/extensions/dropcursor.md | 25 ++++ docs/src/docPages/api/extensions/focus.md | 25 ++++ docs/src/docPages/api/extensions/gapcursor.md | 25 ++++ docs/src/docPages/api/extensions/mention.md | 2 - .../docPages/api/extensions/placeholder.md | 2 - .../src/docPages/api/extensions/table-cell.md | 6 - .../docPages/api/extensions/table-header.md | 6 - docs/src/docPages/api/extensions/table-row.md | 6 - .../src/docPages/api/extensions/typography.md | 17 +++ docs/src/docPages/api/marks.md | 5 + .../api/{extensions => marks}/bold.md | 0 .../api/{extensions => marks}/code.md | 0 .../api/{extensions => marks}/italic.md | 0 .../api/{extensions => marks}/link.md | 0 .../api/{extensions => marks}/strike.md | 0 .../api/{extensions => marks}/underline.md | 0 docs/src/docPages/api/nodes.md | 5 + .../api/{extensions => nodes}/blockquote.md | 0 .../api/{extensions => nodes}/bullet-list.md | 0 .../api/{extensions => nodes}/code-block.md | 0 .../api/{extensions => nodes}/document.md | 0 .../api/{extensions => nodes}/hard-break.md | 0 .../api/{extensions => nodes}/heading.md | 0 .../{extensions => nodes}/horizontal-rule.md | 0 .../api/{extensions => nodes}/image.md | 0 .../api/{extensions => nodes}/list-item.md | 2 +- .../api/{extensions => nodes}/ordered-list.md | 0 .../api/{extensions => nodes}/paragraph.md | 0 docs/src/docPages/api/nodes/task-item.md | 28 ++++ .../api/{extensions => nodes}/task-list.md | 0 .../api/{extensions => nodes}/text.md | 0 .../api/{extensions => nodes}/todo-item.md | 0 .../api/{extensions => nodes}/todo-list.md | 0 docs/src/docPages/api/overview.md | 2 +- docs/src/links.yaml | 125 +++++++++--------- 36 files changed, 193 insertions(+), 99 deletions(-) delete mode 100644 docs/src/docPages/api/extensions/code-block-highlight.md create mode 100644 docs/src/docPages/api/extensions/dropcursor.md create mode 100644 docs/src/docPages/api/extensions/focus.md create mode 100644 docs/src/docPages/api/extensions/gapcursor.md delete mode 100644 docs/src/docPages/api/extensions/mention.md delete mode 100644 docs/src/docPages/api/extensions/placeholder.md delete mode 100644 docs/src/docPages/api/extensions/table-cell.md delete mode 100644 docs/src/docPages/api/extensions/table-header.md delete mode 100644 docs/src/docPages/api/extensions/table-row.md create mode 100644 docs/src/docPages/api/extensions/typography.md create mode 100644 docs/src/docPages/api/marks.md rename docs/src/docPages/api/{extensions => marks}/bold.md (100%) rename docs/src/docPages/api/{extensions => marks}/code.md (100%) rename docs/src/docPages/api/{extensions => marks}/italic.md (100%) rename docs/src/docPages/api/{extensions => marks}/link.md (100%) rename docs/src/docPages/api/{extensions => marks}/strike.md (100%) rename docs/src/docPages/api/{extensions => marks}/underline.md (100%) create mode 100644 docs/src/docPages/api/nodes.md rename docs/src/docPages/api/{extensions => nodes}/blockquote.md (100%) rename docs/src/docPages/api/{extensions => nodes}/bullet-list.md (100%) rename docs/src/docPages/api/{extensions => nodes}/code-block.md (100%) rename docs/src/docPages/api/{extensions => nodes}/document.md (100%) rename docs/src/docPages/api/{extensions => nodes}/hard-break.md (100%) rename docs/src/docPages/api/{extensions => nodes}/heading.md (100%) rename docs/src/docPages/api/{extensions => nodes}/horizontal-rule.md (100%) rename docs/src/docPages/api/{extensions => nodes}/image.md (100%) rename docs/src/docPages/api/{extensions => nodes}/list-item.md (81%) rename docs/src/docPages/api/{extensions => nodes}/ordered-list.md (100%) rename docs/src/docPages/api/{extensions => nodes}/paragraph.md (100%) create mode 100644 docs/src/docPages/api/nodes/task-item.md rename docs/src/docPages/api/{extensions => nodes}/task-list.md (100%) rename docs/src/docPages/api/{extensions => nodes}/text.md (100%) rename docs/src/docPages/api/{extensions => nodes}/todo-item.md (100%) rename docs/src/docPages/api/{extensions => nodes}/todo-list.md (100%) diff --git a/docs/src/docPages/api/extensions/code-block-highlight.md b/docs/src/docPages/api/extensions/code-block-highlight.md deleted file mode 100644 index f5eb1540b..000000000 --- a/docs/src/docPages/api/extensions/code-block-highlight.md +++ /dev/null @@ -1,11 +0,0 @@ -# CodeBlockHighlight -Enables you to use the `
` HTML tag with auto-detected syntax highlighting in the editor.
-
-## Settings
-*None*
-
-## Commands
-*None*
-
-## Keyboard shortcuts
-*None*
\ No newline at end of file
diff --git a/docs/src/docPages/api/extensions/dropcursor.md b/docs/src/docPages/api/extensions/dropcursor.md
new file mode 100644
index 000000000..8759a51c8
--- /dev/null
+++ b/docs/src/docPages/api/extensions/dropcursor.md
@@ -0,0 +1,25 @@
+# Dropcursor
+
+## Installation
+```bash
+# with npm
+npm install @tiptap/extension-dropcursor
+
+# with Yarn
+yarn add @tiptap/extension-dropcursor
+```
+
+## Settings
+*None*
+
+## Commands
+*None*
+
+## Keyboard shortcuts
+*None*
+
+## Source code
+[packages/extension-dropcursor/](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-dropcursor/)
+
+## Usage
+
diff --git a/docs/src/docPages/api/extensions/focus.md b/docs/src/docPages/api/extensions/focus.md
new file mode 100644
index 000000000..c6f508676
--- /dev/null
+++ b/docs/src/docPages/api/extensions/focus.md
@@ -0,0 +1,25 @@
+# Focus
+
+## Installation
+```bash
+# with npm
+npm install @tiptap/extension-focus
+
+# with Yarn
+yarn add @tiptap/extension-focus
+```
+
+## Settings
+*None*
+
+## Commands
+*None*
+
+## Keyboard shortcuts
+*None*
+
+## Source code
+[packages/extension-focus/](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-focus/)
+
+## Usage
+
diff --git a/docs/src/docPages/api/extensions/gapcursor.md b/docs/src/docPages/api/extensions/gapcursor.md
new file mode 100644
index 000000000..1f16726be
--- /dev/null
+++ b/docs/src/docPages/api/extensions/gapcursor.md
@@ -0,0 +1,25 @@
+# Gapcursor
+
+## Installation
+```bash
+# with npm
+npm install @tiptap/extension-gapcursor
+
+# with Yarn
+yarn add @tiptap/extension-gapcursor
+```
+
+## Settings
+*None*
+
+## Commands
+*None*
+
+## Keyboard shortcuts
+*None*
+
+## Source code
+[packages/extension-gapcursor/](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-gapcursor/)
+
+## Usage
+
diff --git a/docs/src/docPages/api/extensions/mention.md b/docs/src/docPages/api/extensions/mention.md
deleted file mode 100644
index 3c2c08388..000000000
--- a/docs/src/docPages/api/extensions/mention.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# Mention
-Enables you to use mentions in the editor.
diff --git a/docs/src/docPages/api/extensions/placeholder.md b/docs/src/docPages/api/extensions/placeholder.md
deleted file mode 100644
index cc9da0062..000000000
--- a/docs/src/docPages/api/extensions/placeholder.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# Placeholder
-Enables you to show placeholders on empty paragraphs.
diff --git a/docs/src/docPages/api/extensions/table-cell.md b/docs/src/docPages/api/extensions/table-cell.md
deleted file mode 100644
index 09a285337..000000000
--- a/docs/src/docPages/api/extensions/table-cell.md
+++ /dev/null
@@ -1,6 +0,0 @@
-# TableCell
-Enables you to use the `` HTML tag in the editor.
-
-::: warning Restrictions
-This extensions is intended to be used with the `Table` extension.
-:::
diff --git a/docs/src/docPages/api/extensions/table-header.md b/docs/src/docPages/api/extensions/table-header.md
deleted file mode 100644
index 25731c274..000000000
--- a/docs/src/docPages/api/extensions/table-header.md
+++ /dev/null
@@ -1,6 +0,0 @@
-# TableHeader
-Enables you to use the `` HTML tag in the editor.
-
-::: warning Restrictions
-This extensions is intended to be used with the `Table` extension.
-:::
\ No newline at end of file
diff --git a/docs/src/docPages/api/extensions/table-row.md b/docs/src/docPages/api/extensions/table-row.md
deleted file mode 100644
index 748e0c8c0..000000000
--- a/docs/src/docPages/api/extensions/table-row.md
+++ /dev/null
@@ -1,6 +0,0 @@
-# TableRow
-Enables you to use the `` HTML tag in the editor.
-
-::: warning Restrictions
-This extensions is intended to be used with the `Table` extension.
-:::
\ No newline at end of file
diff --git a/docs/src/docPages/api/extensions/typography.md b/docs/src/docPages/api/extensions/typography.md
new file mode 100644
index 000000000..2cd372ea1
--- /dev/null
+++ b/docs/src/docPages/api/extensions/typography.md
@@ -0,0 +1,17 @@
+# Typography
+
+
+## Installation
+```bash
+# with npm
+npm install @tiptap/typography
+
+# with Yarn
+yarn add @tiptap/typography
+```
+
+## Source code
+[packages/typography/](https://github.com/ueberdosis/tiptap-next/blob/main/packages/typography/)
+
+## Usage
+
diff --git a/docs/src/docPages/api/marks.md b/docs/src/docPages/api/marks.md
new file mode 100644
index 000000000..80557d6c5
--- /dev/null
+++ b/docs/src/docPages/api/marks.md
@@ -0,0 +1,5 @@
+# Marks
+
+## toc
+
+## Introduction
diff --git a/docs/src/docPages/api/extensions/bold.md b/docs/src/docPages/api/marks/bold.md
similarity index 100%
rename from docs/src/docPages/api/extensions/bold.md
rename to docs/src/docPages/api/marks/bold.md
diff --git a/docs/src/docPages/api/extensions/code.md b/docs/src/docPages/api/marks/code.md
similarity index 100%
rename from docs/src/docPages/api/extensions/code.md
rename to docs/src/docPages/api/marks/code.md
diff --git a/docs/src/docPages/api/extensions/italic.md b/docs/src/docPages/api/marks/italic.md
similarity index 100%
rename from docs/src/docPages/api/extensions/italic.md
rename to docs/src/docPages/api/marks/italic.md
diff --git a/docs/src/docPages/api/extensions/link.md b/docs/src/docPages/api/marks/link.md
similarity index 100%
rename from docs/src/docPages/api/extensions/link.md
rename to docs/src/docPages/api/marks/link.md
diff --git a/docs/src/docPages/api/extensions/strike.md b/docs/src/docPages/api/marks/strike.md
similarity index 100%
rename from docs/src/docPages/api/extensions/strike.md
rename to docs/src/docPages/api/marks/strike.md
diff --git a/docs/src/docPages/api/extensions/underline.md b/docs/src/docPages/api/marks/underline.md
similarity index 100%
rename from docs/src/docPages/api/extensions/underline.md
rename to docs/src/docPages/api/marks/underline.md
diff --git a/docs/src/docPages/api/nodes.md b/docs/src/docPages/api/nodes.md
new file mode 100644
index 000000000..ee9fa386a
--- /dev/null
+++ b/docs/src/docPages/api/nodes.md
@@ -0,0 +1,5 @@
+# Nodes
+
+## toc
+
+## Introduction
diff --git a/docs/src/docPages/api/extensions/blockquote.md b/docs/src/docPages/api/nodes/blockquote.md
similarity index 100%
rename from docs/src/docPages/api/extensions/blockquote.md
rename to docs/src/docPages/api/nodes/blockquote.md
diff --git a/docs/src/docPages/api/extensions/bullet-list.md b/docs/src/docPages/api/nodes/bullet-list.md
similarity index 100%
rename from docs/src/docPages/api/extensions/bullet-list.md
rename to docs/src/docPages/api/nodes/bullet-list.md
diff --git a/docs/src/docPages/api/extensions/code-block.md b/docs/src/docPages/api/nodes/code-block.md
similarity index 100%
rename from docs/src/docPages/api/extensions/code-block.md
rename to docs/src/docPages/api/nodes/code-block.md
diff --git a/docs/src/docPages/api/extensions/document.md b/docs/src/docPages/api/nodes/document.md
similarity index 100%
rename from docs/src/docPages/api/extensions/document.md
rename to docs/src/docPages/api/nodes/document.md
diff --git a/docs/src/docPages/api/extensions/hard-break.md b/docs/src/docPages/api/nodes/hard-break.md
similarity index 100%
rename from docs/src/docPages/api/extensions/hard-break.md
rename to docs/src/docPages/api/nodes/hard-break.md
diff --git a/docs/src/docPages/api/extensions/heading.md b/docs/src/docPages/api/nodes/heading.md
similarity index 100%
rename from docs/src/docPages/api/extensions/heading.md
rename to docs/src/docPages/api/nodes/heading.md
diff --git a/docs/src/docPages/api/extensions/horizontal-rule.md b/docs/src/docPages/api/nodes/horizontal-rule.md
similarity index 100%
rename from docs/src/docPages/api/extensions/horizontal-rule.md
rename to docs/src/docPages/api/nodes/horizontal-rule.md
diff --git a/docs/src/docPages/api/extensions/image.md b/docs/src/docPages/api/nodes/image.md
similarity index 100%
rename from docs/src/docPages/api/extensions/image.md
rename to docs/src/docPages/api/nodes/image.md
diff --git a/docs/src/docPages/api/extensions/list-item.md b/docs/src/docPages/api/nodes/list-item.md
similarity index 81%
rename from docs/src/docPages/api/extensions/list-item.md
rename to docs/src/docPages/api/nodes/list-item.md
index 37e9b0719..8d6e816e2 100644
--- a/docs/src/docPages/api/extensions/list-item.md
+++ b/docs/src/docPages/api/nodes/list-item.md
@@ -3,7 +3,7 @@ The ListItem extension adds support for the `
  • ` HTML tag. It’s used for bul ## Installation ::: warning Restrictions -This extensions is intended to be used with the [`BulletList`](/api/extensions/bullet-list) or [`OrderedList`](/api/extensions/ordered-list) extension. It doesn’t work without at least using one of them. +This extension is intended to be used with the [`BulletList`](/api/extensions/bullet-list) or [`OrderedList`](/api/extensions/ordered-list) extension. It doesn’t work without at least using one of them. ::: ```bash diff --git a/docs/src/docPages/api/extensions/ordered-list.md b/docs/src/docPages/api/nodes/ordered-list.md similarity index 100% rename from docs/src/docPages/api/extensions/ordered-list.md rename to docs/src/docPages/api/nodes/ordered-list.md diff --git a/docs/src/docPages/api/extensions/paragraph.md b/docs/src/docPages/api/nodes/paragraph.md similarity index 100% rename from docs/src/docPages/api/extensions/paragraph.md rename to docs/src/docPages/api/nodes/paragraph.md diff --git a/docs/src/docPages/api/nodes/task-item.md b/docs/src/docPages/api/nodes/task-item.md new file mode 100644 index 000000000..a7228168d --- /dev/null +++ b/docs/src/docPages/api/nodes/task-item.md @@ -0,0 +1,28 @@ +# TaskItem + +## Installation +::: warning Restrictions +This extension is intended to be used with the [`TaskList`](/api/extensions/task-list) extension. It doesn’t work without at least using one of them. +::: + +```bash +# With npm +npm install @tiptap/extension-task-list @tiptap/extension-task-item + +# Or: With Yarn +yarn add @tiptap/extension-task-list @tiptap/extension-task-item +``` + +## Settings +| Option | Type | Default | Description | +| ------ | ------ | ------- | -------------------------------------------- | +| class | string | – | Add a custom class to the rendered HTML tag. | + +## Commands +*None* + +## Source code +[packages/extension-task-item/](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-task-item/) + +## Usage + diff --git a/docs/src/docPages/api/extensions/task-list.md b/docs/src/docPages/api/nodes/task-list.md similarity index 100% rename from docs/src/docPages/api/extensions/task-list.md rename to docs/src/docPages/api/nodes/task-list.md diff --git a/docs/src/docPages/api/extensions/text.md b/docs/src/docPages/api/nodes/text.md similarity index 100% rename from docs/src/docPages/api/extensions/text.md rename to docs/src/docPages/api/nodes/text.md diff --git a/docs/src/docPages/api/extensions/todo-item.md b/docs/src/docPages/api/nodes/todo-item.md similarity index 100% rename from docs/src/docPages/api/extensions/todo-item.md rename to docs/src/docPages/api/nodes/todo-item.md diff --git a/docs/src/docPages/api/extensions/todo-list.md b/docs/src/docPages/api/nodes/todo-list.md similarity index 100% rename from docs/src/docPages/api/extensions/todo-list.md rename to docs/src/docPages/api/nodes/todo-list.md diff --git a/docs/src/docPages/api/overview.md b/docs/src/docPages/api/overview.md index d8ff4f5c7..46b551c6f 100644 --- a/docs/src/docPages/api/overview.md +++ b/docs/src/docPages/api/overview.md @@ -8,6 +8,6 @@ ProseMirror works with a strict [Schema](/api/schema), which defines the allowed The document is stored in a state. All changes are applied as transactions to the state. The state has details about the current content, cursor position and selection. You can hook into a few different [events](/api/events), for example to alter transactions before they get applied. ### Extensions -[Extensions](/api/extensions) add functionality like nodes, marks and/or commands to the editor. A huge amount of commands are bound to common [keyboard shortcuts](/api/keyboard-shortcuts). +Extensions add [nodes](/api/nodes), [marks](/api/marks) and/or [functionalities](/api/extensions) to the editor. A lot of those extensions bound their commands to common [keyboard shortcuts](/api/keyboard-shortcuts). All those concepts are explained in detail on the following pages. diff --git a/docs/src/links.yaml b/docs/src/links.yaml index e52f8da11..647c47b33 100644 --- a/docs/src/links.yaml +++ b/docs/src/links.yaml @@ -104,22 +104,58 @@ link: /api/overview - title: Editor link: /api/editor + - title: Nodes + link: /api/nodes + items: + - title: Blockquote + link: /api/nodes/blockquote + - title: BulletList + link: /api/nodes/bullet-list + - title: CodeBlock + link: /api/nodes/code-block + - title: Document + link: /api/nodes/document + - title: HardBreak + link: /api/nodes/hard-break + - title: Heading + link: /api/nodes/heading + - title: HorizontalRule + link: /api/nodes/horizontal-rule + - title: Image + link: /api/nodes/image + draft: true + - title: ListItem + link: /api/nodes/list-item + - title: OrderedList + link: /api/nodes/ordered-list + - title: Paragraph + link: /api/nodes/paragraph + - title: TaskList + link: /api/nodes/task-list + draft: true + - title: TaskItem + link: /api/nodes/task-item + draft: true + - title: Text + link: /api/nodes/text + - title: Marks + link: /api/marks + items: + - title: Bold + link: /api/marks/bold + - title: Code + link: /api/marks/code + - title: Italic + link: /api/marks/italic + - title: Link + link: /api/marks/link + - title: Strike + link: /api/marks/strike + - title: Underline + link: /api/marks/underline - title: Extensions link: /api/extensions items: - - title: Blockquote - link: /api/extensions/blockquote - - title: Bold - link: /api/extensions/bold - - title: BulletList - link: /api/extensions/bullet-list - - title: Code - link: /api/extensions/code - - title: CodeBlock - link: /api/extensions/code-block - # - title: CodeBlockHighlight - # link: /api/extensions/code-block-highlight - # draft: true - title: Collaboration link: /api/extensions/collaboration premium: true @@ -127,62 +163,23 @@ link: /api/extensions/collaboration-cursor draft: true premium: true - - title: Document - link: /api/extensions/document - - title: HardBreak - link: /api/extensions/hard-break - - title: Heading - link: /api/extensions/heading + - title: Dropcursor + link: /api/extensions/dropcursor + draft: true + - title: Focus + link: /api/extensions/focus + draft: true + - title: Gapcursor + link: /api/extensions/gapcursor + draft: true - title: History link: /api/extensions/history - - title: HorizontalRule - link: /api/extensions/horizontal-rule - - title: Image - link: /api/extensions/image - draft: true - - title: Italic - link: /api/extensions/italic - - title: Link - link: /api/extensions/link - - title: ListItem - link: /api/extensions/list-item - # - title: Mention - # link: /api/extensions/mention - # draft: true - - title: OrderedList - link: /api/extensions/ordered-list - - title: Paragraph - link: /api/extensions/paragraph - # - title: Placeholder - # link: /api/extensions/placeholder - # draft: true - - title: Strike - link: /api/extensions/strike - - title: TaskList - link: /api/extensions/task-list - draft: true - # - title: TableCell - # link: /api/extensions/table-cell - # draft: true - # - title: TableHeader - # link: /api/extensions/table-header - # draft: true - # - title: TableRow - # link: /api/extensions/table-row - # draft: true - - title: Text - link: /api/extensions/text - title: TextAlign link: /api/extensions/text-align draft: true - # - title: TodoItem - # link: /api/extensions/todo-item - # draft: true - # - title: TodoList - # link: /api/extensions/todo-list - # draft: true - - title: Underline - link: /api/extensions/underline + - title: Typography + link: /api/extensions/typography + draft: true - title: Commands link: /api/commands - title: Events