docs: add the react installation instructions

This commit is contained in:
Hans Pagel
2021-03-18 23:33:47 +01:00
parent 080ccf0131
commit ae2505fe21
6 changed files with 88 additions and 12 deletions

View File

@@ -34,7 +34,7 @@ npm install @tiptap/vue-2 @tiptap/starter-kit
yarn add @tiptap/vue-2 @tiptap/starter-kit
```
If you followed step 1 and 2, you can now start your project with `npm run dev` or `yarn dev`, and open [http://localhost:8080/](http://localhost:3000/) in your favorite browser. This might be different, if youre working with an existing project.
If you followed step 1 and 2, you can now start your project with `npm run dev` or `yarn dev`, and open [http://localhost:8080](http://localhost:8080) in your favorite browser. This might be different, if youre working with an existing project.
## 3. Create a new component
To actually start using tiptap, youll need to add a new component to your app. Lets call it `Tiptap` and put the following example code in `components/Tiptap.vue`.
@@ -97,7 +97,7 @@ export default {
</script>
```
You should now see tiptap in your browser. Youve successfully set up tiptap! Time to give yourself a pat on the back. Lets start to configure your editor in the next step.
You should now see tiptap in your browser. Youve successfully set up tiptap! Time to give yourself a pat on the back.
## 5. Use v-model (optional)
Youre probably used to bind your data with `v-model` in forms, thats also possible with tiptap. Here is a working example component, that you can integrate in your project: