add more content everywhere

This commit is contained in:
Hans Pagel
2020-09-15 21:07:16 +02:00
parent 3470400785
commit 17c22b8a2b
8 changed files with 46 additions and 37 deletions

View File

@@ -5,3 +5,21 @@ This content is written for tiptap 1 and needs an update.
:::
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.
## Editor Properties
| Property | Type | Default | Description |
| ---------------------- | :--------------: | :---------: | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `content` | `Object\|String` | `null` | The editor state object used by Prosemirror. You can also pass HTML to the `content` slot. When used both, the `content` slot will be ignored. |
| `editorProps` | `Object` | `{}` | A list of [Prosemirror editorProps](https://prosemirror.net/docs/ref/#view.EditorProps). |
| `editable` | `Boolean` | `true` | When set to `false` the editor is read-only. |
| `autoFocus` | `Boolean` | `false` | Focus the editor on init. |
| `extensions` | `Array` | `[]` | A list of extensions used, by the editor. This can be `Nodes`, `Marks` or `Plugins`. |
| `useBuiltInExtensions` | `Boolean` | `true` | By default tiptap adds a `Doc`, `Paragraph` and `Text` node to the Prosemirror schema. |
| `dropCursor` | `Object` | `{}` | Config for `prosemirror-dropcursor`. |
| `enableDropCursor` | `Boolean` | `true` | Option to enable / disable the dropCursor plugin. |
| `enableGapCursor` | `Boolean` | `true` | Option to enable / disable the gapCursor plugin. |
| `parseOptions` | `Object` | `{}` | A list of [Prosemirror parseOptions](https://prosemirror.net/docs/ref/#model.ParseOptions). |
| `onInit` | `Function` | `undefined` | This will return an Object with the current `state` and `view` of Prosemirror on init. |
| `onFocus` | `Function` | `undefined` | This will return an Object with the `event` and current `state` and `view` of Prosemirror on focus. |
| `onBlur` | `Function` | `undefined` | This will return an Object with the `event` and current `state` and `view` of Prosemirror on blur. |
| `onUpdate` | `Function` | `undefined` | This will return an Object with the current `state` of Prosemirror, a `getJSON()` and `getHTML()` function and the `transaction` on every change. |

View File

@@ -8,18 +8,16 @@ See an example with `autoFocus: true` here:
```js
import { Editor } from '@tiptap/core'
import extensions from '@tiptap/starter-kit'
import defaultExtensions from '@tiptap/starter-kit'
new Editor({
element: document.getElementsByClassName('element'),
extensions: extensions(),
extensions: defaultExtensions(),
content: '<p>Hey there!</p>',
autoFocus: true,
})
```
This will set the focus to tiptap after the editor is initialized. Of course, there are way more options available. Read about all of them in the related links.
This will set the focus to tiptap after the editor is initialized. Of course, there are way more options available.
### Related links
* [See available options](#)
Check out the API documentation to see [all available options](/api/editor/).

View File

@@ -1,11 +1,20 @@
# Contributing
Tiptap would be nothing, without its lively community. Contributions have always been and will always be welcome. Here is a little bit you should know, before you send your contributions:
## What kind of contributions are welcome
## What kind of contributions wont be merged
## How to send your first Pull Request
* Improved documentation, e. g. fixing typos, new sections, further explanation …)
* New features for existing extensions, e. g. a new option
* New extensions, which dont require changes to the core or other core extensions
* Well explained, non-breaking changes to the core
## Code style
There is a eslint config, that ensures a consistent code style. To check for errors, run `$ yarn run lint`. Thatll be checked when you send a pull request. Make sure its passing, before sending a pull request.
## Testing
All your pull requests will automatically run all our existing tests. Make sure that they all pass. Run all tests locally with `$ yarn run test` or run single tests (e. g. when writing new ones) with `$ yarn run test:open`.
Any further questions? Create a new issue or discussion in the repository. Well get back to you.

View File

@@ -1,3 +0,0 @@
# Roadmap
See https://github.com/ueberdosis/tiptap-next/projects/1

View File

@@ -1,3 +0,0 @@
# Sponsoring
https://github.com/sponsors/ueberdosis

View File

@@ -1,16 +1,16 @@
# Upgrade Guide
The new API will look pretty familiar too you, but there are a ton of changes though. To make the upgrade a little bit easier, here is everything you need to know:
## Reasons to upgrade to tiptap 2.x
* TypeScript: auto complete, less bugs, generated API documentation
* Amazing documentation with 100+ pages
* Active maintenance, no more updates to 1.x
* Tons of new extensions planned
* Less bugs, tested code based
* autocomplete in your IDE (thanks to TypeScript)
* an amazing documentation with 100+ pages
* active development, new features in the making
* tons of new extensions planned
* well-tested code base
## Upgrading from 1.x to 2.x
The new API will look pretty familiar too you, but there are a ton of changes though. To make the upgrade a little bit easier, here is everything you need to know:
### 1. Explicitly register the Document, Text and Paragraph extensions
Tiptap 1 tried to hide a few required extensions from you. Be sure to explicitly import the [Document](/api/extensions/document), [Paragraph](/api/extensions/paragraph) and [Text](/api/extensions/text) extensions.
@@ -55,3 +55,6 @@ const CustomExtension = …
### 4. Blockquotes must not be nested anymore
:::warning Breaking Change
Currently, blockquotes must not be nested anymore. That said, were working on bringing it back. If you use nested blockquotes in your app, dont upgrade yet.
:::

View File

@@ -34,10 +34,6 @@
</header>
<div class="app__content">
<div class="app__sidebar-wrapper" :class="{ 'is-mobile-visible': menuIsVisible }">
<select name="" id="">
<option value="vue">Vue.js</option>
<option value="react">React</option>
</select>
<nav class="app__sidebar">
<div class="app__link-group" v-for="(linkGroup, i) in linkGroups" :key="i">
<div class="app__link-group-title">

View File

@@ -6,16 +6,8 @@
link: /overview/installation
- title: Upgrade Guide
link: /overview/upgrade-guide
draft: true
- title: Contributing
link: /overview/contributing
draft: true
- title: Sponsoring
link: /overview/sponsoring
draft: true
- title: Roadmap
link: /overview/roadmap
draft: true
- title: Guide
items:
@@ -23,7 +15,6 @@
link: /guide/getting-started
- title: Configuration
link: /guide/configuration
draft: true
- title: Build your editor
link: /guide/build-your-editor
draft: true