update installation guide
This commit is contained in:
@@ -2,15 +2,15 @@
|
|||||||
|
|
||||||
tiptap has a very modular package structure and is independent of any framework. Depending on what you want to do with tiptap there are a few different ways to install tiptap in your project. Choose the way that fits your project best.
|
tiptap has a very modular package structure and is independent of any framework. Depending on what you want to do with tiptap there are a few different ways to install tiptap in your project. Choose the way that fits your project best.
|
||||||
|
|
||||||
## Vanilla JavaScript
|
## Plain JavaScript
|
||||||
|
|
||||||
Use tiptap with vanilla JavaScript for a very lightweight and raw experience. If you feel like it, you can even use it to connect the tiptap core with other frameworks not mentioned here.
|
Use tiptap with vanilla JavaScript for a very lightweight and raw experience. If you feel like it, you can even use it to connect the tiptap core with other frameworks not mentioned here.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Use npm
|
# With npm
|
||||||
npm install @tiptap/core @tiptap/starter-kit
|
npm install @tiptap/core @tiptap/starter-kit
|
||||||
|
|
||||||
# Or: Use Yarn
|
# With yarn
|
||||||
yarn add @tiptap/core @tiptap/starter-kit
|
yarn add @tiptap/core @tiptap/starter-kit
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -18,11 +18,11 @@ Great, that should be enough to start. Here is the most essential code you need
|
|||||||
|
|
||||||
```js
|
```js
|
||||||
import { Editor } from '@tiptap/core'
|
import { Editor } from '@tiptap/core'
|
||||||
import extensions from '@tiptap/starter-kit'
|
import defaultExtensions from '@tiptap/starter-kit'
|
||||||
|
|
||||||
new Editor({
|
new Editor({
|
||||||
element: document.getElementsByClassName('element'),
|
element: document.getElementsByClassName('element'),
|
||||||
extensions: extensions(),
|
extensions: defaultExtensions(),
|
||||||
content: '<p>Your content.</p>',
|
content: '<p>Your content.</p>',
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user