Skip to content

Commit

Permalink
fix: readme wrong package
Browse files Browse the repository at this point in the history
  • Loading branch information
harshtalks committed Sep 25, 2024
1 parent 978d87b commit e1044f0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ It supports both useEditor hook and EditorProvider from tiptap.

## Installation

Install my-project with npm
Install the package using pnpm

```bash
pnpm add @harshtalks/tiptap-image
pnpm add @harshtalks/image-tiptap
```

You can use npm, bun, or yarn etc.
Expand All @@ -29,7 +29,7 @@ Install my-project with npm
```tsx
import { useEditor, EditorContent } from "@tiptap/react";
import StarterKit from "@tiptap/starter-kit";
import { ImageExtension, ImageAligner } from "@harshtalks/tiptap-image";
import { ImageExtension, ImageAligner } from "@harshtalks/image-tiptap";
import "./globals.css";
import { useCallback } from "react";

Expand Down Expand Up @@ -106,7 +106,7 @@ Installing the package using pnpm

1. Define suggestions. Add all the commaands you want in the slash menu.
```ts
import { enableKeyboardNavigation } from "@harshtalks/tiptap-slash";
import { enableKeyboardNavigation } from "@harshtalks/slash-tiptap";

const suggestions = createSuggestionsItems([
{
Expand Down Expand Up @@ -143,7 +143,7 @@ const suggestions = createSuggestionsItems([
import {
Slash,
enableKeyboardNavigation,
} from "@harshtalks/tiptap-slash";
} from "@harshtalks/slash-tiptap";


const editor = useEditor({
Expand Down Expand Up @@ -186,6 +186,9 @@ const editor = useEditor({

3. Wrap your editor in `SlashCmdProvider` component and add `SlashCmd` component to your editor.
```tsx
import {
SlashCmd
} from "@harshtalks/slash-tiptap";

export const Editor = () => {
return (
Expand Down
4 changes: 2 additions & 2 deletions packages/tiptap-image/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ Installing the package using pnpm

You can use npm, bun, or yarn etc.

## Usage
## Usage

```tsx
import { useEditor, EditorContent } from "@tiptap/react";
import StarterKit from "@tiptap/starter-kit";
import { ImageExtension, ImageAligner } from "@harshtalks/tiptap-image";
import { ImageExtension, ImageAligner } from "@harshtalks/image-tiptap";
import "./globals.css";
import { useCallback } from "react";

Expand Down
8 changes: 6 additions & 2 deletions packages/tiptap-slash/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Installing the package using pnpm

1. Define suggestions. Add all the commaands you want in the slash menu.
```ts
import { enableKeyboardNavigation } from "@harshtalks/tiptap-slash";
import { enableKeyboardNavigation } from "@harshtalks/slash-tiptap";

const suggestions = createSuggestionsItems([
{
Expand Down Expand Up @@ -61,7 +61,7 @@ const suggestions = createSuggestionsItems([
import {
Slash,
enableKeyboardNavigation,
} from "@harshtalks/tiptap-slash";
} from "@harshtalks/slash-tiptap";


const editor = useEditor({
Expand Down Expand Up @@ -104,6 +104,10 @@ const editor = useEditor({

3. Wrap your editor in `SlashCmdProvider` component and add `SlashCmd` component to your editor.
```tsx
import {
SlashCmd
} from "@harshtalks/slash-tiptap";


export const Editor = () => {
return (
Expand Down

0 comments on commit e1044f0

Please sign in to comment.