19 | {/* toolbar plugins */}
20 |
28 | }
29 | ErrorBoundary={LexicalErrorBoundary}
30 | />
31 | {/* editor plugins */}
32 |
33 | {/* actions plugins */}
34 |
35 | )
36 | }
37 |
--------------------------------------------------------------------------------
/registry/new-york-v4/editor/plugins/toolbar/block-format/format-paragraph.tsx:
--------------------------------------------------------------------------------
1 | import { $setBlocksType } from "@lexical/selection"
2 | import { $createParagraphNode, $getSelection, $isRangeSelection } from "lexical"
3 |
4 | import { useToolbarContext } from "@/registry/new-york-v4/editor/context/toolbar-context"
5 | import { blockTypeToBlockName } from "@/registry/new-york-v4/editor/plugins/toolbar/block-format/block-format-data"
6 | import { SelectItem } from "@/registry/new-york-v4/ui/select"
7 |
8 | const BLOCK_FORMAT_VALUE = "paragraph"
9 |
10 | export function FormatParagraph() {
11 | const { activeEditor } = useToolbarContext()
12 |
13 | const formatParagraph = () => {
14 | activeEditor.update(() => {
15 | const selection = $getSelection()
16 | if ($isRangeSelection(selection)) {
17 | $setBlocksType(selection, () => $createParagraphNode())
18 | }
19 | })
20 | }
21 |
22 | return (
23 |
12 |
13 | Undocx - Collaborative Rich Text Editor
14 |
15 |
16 | A realtime collaborative editor inspired by Google Docs
17 |
18 |
19 | Features real-time multi-user editing, cursor presence, threaded comments, and dark mode support.
20 |
21 |
24 |
30 | Visit Undocx
31 |
32 |
33 | )
34 | }
35 |
--------------------------------------------------------------------------------
/content/docs/plugins/actions/share-content.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Share Content
3 | description: A plugin that enables content sharing functionality with file export and toast notifications.
4 | ---
5 |
6 |