Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
rChaoz committed Oct 25, 2024
1 parent 44ac42c commit 13bdc05
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
# svelte-tiptap

> Svelte 4 & 5 components for tiptap v2
> Svelte components for tiptap v2
[![Tests](https://github.com/sibiraj-s/svelte-tiptap/actions/workflows/tests.yml/badge.svg)](https://github.com/sibiraj-s/svelte-tiptap/actions/workflows/tests.yml)
[![NPM Version](https://badgen.net/npm/v/svelte-tiptap)](https://www.npmjs.com/package/svelte-tiptap)
[![Total Downloads](https://badgen.net/npm/dt/svelte-tiptap)](https://www.npmjs.com/package/svelte-tiptap)
[![Monthly Downloads](https://badgen.net/npm/dm/svelte-tiptap)](https://www.npmjs.com/package/svelte-tiptap)
[![License](https://badgen.net/npm/license/svelte-tiptap)](https://github.com/sibiraj-s/svelte-tiptap/blob/master/LICENSE)

> [!IMPORTANT]
> If you're still using **Svelte 4**, you'll need the Svelte 4 version of svelte-tiptap, installed by specifying `svelte-tiptap@1`.
> See the full version 1 documentation [here](https://github.com/sibiraj-s/svelte-tiptap/tree/v1.1.3?tab=readme-ov-file#svelte-tiptap).
## Installation

```bash
Expand All @@ -16,14 +20,6 @@ npm i svelte-tiptap
yarn add svelte-tiptap
```

If you're still using Svelte 4, you can use version 1 instead:

```bash
npm i svelte-tiptap@1
# or
yarn add svelte-tiptap@1
```

> [!NOTE]
> This package just provides components for svelte. For configuring/customizing the editor, refer [tiptap's official documentation](https://www.tiptap.dev/).
Expand Down Expand Up @@ -148,7 +144,7 @@ export const SvelteCounterExtension = Node.create({
import cx from 'clsx';
import { NodeViewWrapper } from 'svelte-tiptap';
let { node, updateAttributes }: NodeViewProps = $props()
let { node, updateAttributes }: NodeViewProps = $props();
const handleClick = () => {
updateAttributes({ count: node.attrs.count + 1 });
Expand Down Expand Up @@ -197,7 +193,7 @@ Refer https://www.tiptap.dev/guide/node-views/react/#all-available-props for the
```ts
import type { NodeViewProps } from '@tiptap/core';

let { node, updateAttributes, /* ...other props as needed */ }: NodeViewProps = $props()
let { node, updateAttributes /* ...other props as needed */ }: NodeViewProps = $props();

// update attributes
const handleClick = () => {
Expand Down

0 comments on commit 13bdc05

Please sign in to comment.