add table of content support

This commit is contained in:
Hans Pagel
2020-09-27 10:29:01 +02:00
parent bcef08ce2a
commit 149ce56ad8
18 changed files with 66 additions and 19 deletions

View File

@@ -1,6 +1,8 @@
# Editor
This class is a central building block of tiptap. It does most of the heavy lifting of creating a working [ProseMirror](https://ProseMirror.net/) editor such as creating the [`EditorView`](https://ProseMirror.net/docs/ref/#view.EditorView), setting the initial [`EditorState`](https://ProseMirror.net/docs/ref/#state.Editor_State) and so on.
## Table of Contents
## Configuration
| Setting | Type | Default | Description |
| ------------------ | --------------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

View File

@@ -1,6 +1,8 @@
# Events
The editor fires a few different events that you can hook into. There are two ways to register event listeners:
## Table of Contents
## Option 1: Right-away
You can define your event listeners on a new editor instance right-away:

View File

@@ -1,6 +1,8 @@
# Extensions
Extensions are the way to add functionality to tiptap. By default tiptap comes bare, without any of them, but we have a long list of extensions that are ready to be used with tiptap.
## Table of Contents
## A minimalist set of extensions
Youll need at least three extensions: `Document`, `Paragraph` and `Text`. See [an example of a tiptap version for minimalists](/examples/minimalist).

View File

@@ -7,6 +7,8 @@ Modifiers can be given in any order. `Shift`, `Alt`, `Control` and `Cmd` are rec
You can use `Mod` as a shorthand for `Cmd` on Mac and `Control` on other platforms.
## Table of Contents
## Overwrite keyboard shortcuts
```js

View File

@@ -5,6 +5,8 @@ This schema is *very* strict. You cant use any HTML element or attribute that
Let me give you one example: If you paste something like `This is <strong>important</strong>` into tiptap, dont have any extension that handles `strong` tags registered, youll only see `This is important` without the strong tags.
## Table of Contents
## How a schema looks like
The most simple schema for a typical *ProseMirror* editor is looking something like that: