add introduction to all pages, move under table of contents

This commit is contained in:
Hans Pagel
2020-10-01 12:26:20 +02:00
parent 1250f1f1b6
commit d99b75f6dd
13 changed files with 42 additions and 13 deletions

View File

@@ -1,8 +1,10 @@
# Configuration
In its simplest version tiptap comes very raw. There is no menu, no buttons, no styling. Thats intended. See tiptap as your building blocks to build exactly the editor you would like to have.
# Build your editor
## Table of Contents
## Introduction
In its simplest version tiptap comes very raw. There is no menu, no buttons, no styling. Thats intended. See tiptap as your building blocks to build exactly the editor you would like to have.
## Adding a menu
Lets start to add your first button to the editor. Once initiated the editor has a powerful API. The so called *commands* allow you to modify selected text (and tons of other things). Here is an example with one single button:

View File

@@ -1,8 +1,10 @@
# Configuration
tiptap is all about customization. There are a ton of options to configure the behavior and functionality of the editor. Most of those settings can be set before creating the Editor. Give tiptap a JSON with all the settings you would like to overwrite.
## Table of Contents
## Introduction
tiptap is all about customization. There are a ton of options to configure the behavior and functionality of the editor. Most of those settings can be set before creating the Editor. Give tiptap a JSON with all the settings you would like to overwrite.
## Overwrite the default settings
See an example with `autoFocus: true` here:

View File

@@ -1,8 +1,10 @@
# Custom Extensions
Lets extend tiptap with a custom extension!
## Table of Contents
## Introduction
Lets extend tiptap with a custom extension!
## Option 1: Change defaults
Lets say you want to change the keyboard shortcuts for the bullet list. You should start by looking at [the source code of the `BulletList` extension](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-bullet-list/index.ts) and find the default youd like to change. In that case, the keyboard shortcut, and just that.

View File

@@ -1,8 +1,10 @@
# Custom styling
Tiptap is renderless, that doesnt mean there is no styling provided. You can decided how your editor should look like.
## Table of Contents
## Introduction
Tiptap is renderless, that doesnt mean there is no styling provided. You can decided how your editor should look like.
## Option 1: Style the plain HTML
The whole editor is rendered inside of a container with the class `.ProseMirror`. You can use that to scope your styling to the editor content:

View File

@@ -1,8 +1,10 @@
# Getting started
tiptap is framework-agnostic and works with Vue.js and React. It even works with plain JavaScript, if thats your thing. To keep everything as small as possible, we put the code to use tiptap with those frameworks in different packages.
## Table of Contents
## Introduction
tiptap is framework-agnostic and works with Vue.js and React. It even works with plain JavaScript, if thats your thing. To keep everything as small as possible, we put the code to use tiptap with those frameworks in different packages.
## 1. Install the dependencies
We assume you already have a [Vue.js](https://cli.vuejs.org/) (or [Nuxt.js](https://nuxtjs.org/)) project. To connect tiptap with Vue.js you are going to need an adapter. You can install tiptap for Vue.js as a dependency in your project:

View File

@@ -1,4 +1,8 @@
# Store content
## Table of Contents
## Introduction
You can store your content as a JSON object or as a good old HTML string. Both work fine. And of course, you can pass both formats to the editor to restore your content.
You can store your content as JSON and restore the content from HTML, or the other way around. I dont know why you would do that, but tiptap wouldnt care.