indent-kit

PreviousNext
Docs
platecomponent

Preview

Loading preview…
registry/components/editor/plugins/indent-kit.tsx
'use client';

import { IndentPlugin } from '@platejs/indent/react';
import { KEYS } from 'platejs';

export const IndentKit = [
  IndentPlugin.configure({
    inject: {
      targetPlugins: [
        ...KEYS.heading,
        KEYS.p,
        KEYS.blockquote,
        KEYS.codeBlock,
        KEYS.toggle,
        KEYS.img,
      ],
    },
    options: {
      offset: 24,
    },
  }),
];

Installation

npx shadcn@latest add @plate/indent-kit

Usage

import { IndentKit } from "@/components/indent-kit"
<IndentKit />