docs: use regular case for Tiptap
This commit is contained in:
@@ -6,18 +6,18 @@ tableOfContents: true
|
||||
# React
|
||||
|
||||
## Introduction
|
||||
The following guide describes how to integrate tiptap with your [React](https://reactjs.org/) project.
|
||||
The following guide describes how to integrate Tiptap with your [React](https://reactjs.org/) project.
|
||||
|
||||
## Requirements
|
||||
* [Node](https://nodejs.org/en/download/) installed on your machine
|
||||
* Experience with [React](https://reactjs.org/docs/getting-started.html)
|
||||
|
||||
## Using a template
|
||||
If you just want to get up and running with tiptap you can use the [tiptap Create React App template](https://github.com/alb/cra-template-tiptap) by [@alb](https://github.com/alb) to automatically create a new project with all the steps below already completed.
|
||||
If you just want to get up and running with Tiptap you can use the [tiptap Create React App template](https://github.com/alb/cra-template-tiptap) by [@alb](https://github.com/alb) to automatically create a new project with all the steps below already completed.
|
||||
|
||||
```bash
|
||||
# create a project based on the tiptap template
|
||||
npx create-react-app tiptap-example --template tiptap
|
||||
# create a project based on the Tiptap template
|
||||
npx create-react-app Tiptap-example --template Tiptap
|
||||
```
|
||||
|
||||
## 1. Create a project (optional)
|
||||
@@ -27,14 +27,14 @@ For the sake of this guide, let’s start with a fresh React project called `tip
|
||||
|
||||
```bash
|
||||
# create a project
|
||||
npx create-react-app tiptap-example
|
||||
npx create-react-app Tiptap-example
|
||||
|
||||
# change directory
|
||||
cd tiptap-example
|
||||
cd Tiptap-example
|
||||
```
|
||||
|
||||
## 2. Install the dependencies
|
||||
Okay, enough of the boring boilerplate work. Let’s finally install tiptap! For the following example you’ll need the `@tiptap/react` package, with a few components, and `@tiptap/starter-kit` which has the most common extensions to get started quickly.
|
||||
Okay, enough of the boring boilerplate work. Let’s finally install Tiptap! For the following example you’ll need the `@tiptap/react` package, with a few components, and `@tiptap/starter-kit` which has the most common extensions to get started quickly.
|
||||
|
||||
```bash
|
||||
# install with npm
|
||||
@@ -47,9 +47,9 @@ yarn add @tiptap/react @tiptap/starter-kit
|
||||
If you followed step 1 and 2, you can now start your project with `npm run start` or `yarn start`, and open [http://localhost:3000](http://localhost:3000) in your favorite browser. This might be different, if you’re working with an existing project.
|
||||
|
||||
## 3. Create a new component
|
||||
To actually start using tiptap, you’ll need to create a new component in your app. Let’s call it `Tiptap` and put the following example code in `src/Tiptap.jsx`.
|
||||
To actually start using Tiptap, you’ll need to create a new component in your app. Let’s call it `Tiptap` and put the following example code in `src/Tiptap.jsx`.
|
||||
|
||||
This is the fastest way to get tiptap up and running with React. It will give you a very basic version of tiptap, without any buttons. No worries, you will be able to add more functionality soon.
|
||||
This is the fastest way to get Tiptap up and running with React. It will give you a very basic version of Tiptap, without any buttons. No worries, you will be able to add more functionality soon.
|
||||
|
||||
```jsx
|
||||
import { useEditor, EditorContent } from '@tiptap/react'
|
||||
@@ -88,7 +88,7 @@ const App = () => {
|
||||
export default App
|
||||
```
|
||||
|
||||
You should now see tiptap in your browser. Time to give yourself a pat on the back! :)
|
||||
You should now see Tiptap in your browser. Time to give yourself a pat on the back! :)
|
||||
|
||||
## 5. The complete setup (optional)
|
||||
Ready to add more? Below is a demo that shows how you could set up what we call the default editor. Feel free to take this and start customizing it then:
|
||||
|
||||
Reference in New Issue
Block a user