Skip to content

Commit

Permalink
fixed code being displayed wrong Tiptap.md (#579)
Browse files Browse the repository at this point in the history
  • Loading branch information
htysc authored Mar 18, 2024
2 parents 37eb749 + b80d1b5 commit e4dbb4c
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions Topics/Tech_Stacks/Tiptap/Tiptap.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ There are multiple methods to install Tiptap, each tailored to a specific use ca

## Intro to Tiptap in React

_Include gifs, code snippets, explainations_


**1. Create a project**

Expand Down Expand Up @@ -75,10 +75,9 @@ Each button in the menu bar example code below takes three arguments. Taking the
- The [`className`](https://legacy.reactjs.org/docs/faq-styling.html) is `is-active` or blank depending on whether the selected text is bolded. If the `is-active` `className` is present, the bold button in the menu bar will be emphasized.

Here is the code sourced from [here](https://tiptap.dev/docs/editor/installation/react):
<details>
<summary>Tiptap.jsx</summary>


```
````
import { Color } from '@tiptap/extension-color'
import ListItem from '@tiptap/extension-list-item'
import TextStyle from '@tiptap/extension-text-style'
Expand Down Expand Up @@ -198,11 +197,11 @@ Here is the code sourced from [here](https://tiptap.dev/docs/editor/installation
StarterKit.configure({
bulletList: {
keepMarks: true,
keepAttributes: false, // TODO : Making this as `false` becase marks are not preserved when I try to preserve attrs, awaiting a bit of help
keepAttributes: false,
},
orderedList: {
keepMarks: true,
keepAttributes: false, // TODO : Making this as `false` becase marks are not preserved when I try to preserve attrs, awaiting a bit of help
keepAttributes: false,
},
}),
]
Expand All @@ -228,9 +227,7 @@ Here is the code sourced from [here](https://tiptap.dev/docs/editor/installation
<EditorProvider slotBefore={<MenuBar />} extensions={extensions} content={content}></EditorProvider>
)
}
```

</details>
````



Expand Down

0 comments on commit e4dbb4c

Please sign in to comment.