0.1.0 • Published 8 months ago

tipix v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

Tipix

Tipix seamlessly integrates Radix UI dropdown menus into the TipTap Editor, boasting keyboard shortcut support and accessibility. With Tipix, you'll enjoy a superb user experience while retaining the complete capabilities of the TipTap Editor.

Usage

Define your TipTap Editor as you know it.

import { useEditor } from '@tiptap/react'
import StarterKit from '@tiptap/starter-kit'
import Placeholder from '@tiptap/extension-placeholder'

const editor = useEditor({
    extensions: [
        StarterKit,
          Placeholder.configure({
        placeholder: 'Enter text or press `CTRL + Space`',
    }),
    ]
})

Use Tipix instead of EditorContent from TipTap (Tipix render EditorContent internally). Children of Tipix get rendered as a Item inside the dropdown menu. As you can see, the control over the content is still and only on TipTap (e.g: editor.chain().focus().toggleHeading({ level: 1 }).run())

import { Tipix } from 'tipix'
import { IconH1 } from '@tabler/icons-react';


<Tipix editor={editor}>
    <Tipix.MenuItem
        label='Heading 1'
        description='Use to toggle Heading 1'
        icon={<IconH1 size={18} />}
        onSelect={() => editor.chain().focus().toggleHeading({ level: 1 }).run()}
        isActive={editor.isActive('heading', { level: 1 })}
        aliases={['h1', 'heading1', 'heading 1']}
    />
</Tipix>

Try it out

See Tipix Doc to try it out!

0.1.0

8 months ago

0.0.12

8 months ago

0.0.11

8 months ago

0.0.10

8 months ago

0.0.9

8 months ago

0.0.8

8 months ago

0.0.7

8 months ago

0.0.6

8 months ago

0.0.5

8 months ago

0.0.4

8 months ago

0.0.3

8 months ago

0.0.2

8 months ago

0.0.1

8 months ago