Skip to content

Commit 236d5f3

Browse files
authored
chore: make wysiwyg plugins explicit (#391)
1 parent c67fcc6 commit 236d5f3

File tree

1 file changed

+44
-5
lines changed

1 file changed

+44
-5
lines changed

ui/src/components/nodes/Rich.tsx

Lines changed: 44 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,22 @@ import {
5858
wysiwygPreset,
5959
MarkdownExtension,
6060
TOP_50_TLDS,
61+
BidiExtension,
62+
GapCursorExtension,
63+
ShortcutsExtension,
64+
TrailingNodeExtension,
65+
HardBreakExtension,
66+
HorizontalRuleExtension,
67+
BlockquoteExtension,
68+
CodeBlockExtension,
69+
HeadingExtension,
70+
IframeExtension,
71+
BulletListExtension,
72+
OrderedListExtension,
73+
TaskListExtension,
74+
CodeExtension,
75+
StrikeExtension,
76+
UnderlineExtension,
6177
} from "remirror/extensions";
6278
import {
6379
Remirror,
@@ -564,8 +580,6 @@ const MyEditor = ({
564580
const { manager, state, setState } = useRemirror({
565581
extensions: () => [
566582
new PlaceholderExtension({ placeholder }),
567-
// new BoldExtension(),
568-
// new ItalicExtension(),
569583
new ReactComponentExtension(),
570584
new TableExtension(),
571585
new TextHighlightExtension(),
@@ -575,14 +589,39 @@ const MyEditor = ({
575589
autoLink: true,
576590
autoLinkAllowedTLDs: ["dev", ...TOP_50_TLDS],
577591
}),
578-
new ImageExtension({ enableResizing: true }),
579-
new DropCursorExtension(),
580592
new MarkdownExtension(),
581593
new MyYjsExtension({ getProvider: () => provider, id }),
582594
new MathInlineExtension(),
583595
new MathBlockExtension(),
584596
// new CalloutExtension({ defaultType: "warn" }),
585-
...wysiwygPreset(),
597+
// Plain
598+
new BidiExtension(),
599+
new DropCursorExtension(),
600+
new GapCursorExtension(),
601+
new ShortcutsExtension(),
602+
new TrailingNodeExtension(),
603+
// Nodes
604+
new HardBreakExtension(),
605+
new ImageExtension({ enableResizing: true }),
606+
new HorizontalRuleExtension(),
607+
new BlockquoteExtension(),
608+
new CodeBlockExtension(),
609+
new HeadingExtension(),
610+
new IframeExtension(),
611+
new BulletListExtension(),
612+
new OrderedListExtension(),
613+
new TaskListExtension(),
614+
615+
// Marks
616+
new BoldExtension(),
617+
new CodeExtension(),
618+
new StrikeExtension(),
619+
new ItalicExtension(),
620+
new LinkExtension({
621+
autoLink: true,
622+
autoLinkAllowedTLDs: ["dev", ...TOP_50_TLDS],
623+
}),
624+
new UnderlineExtension(),
586625
],
587626
onError: ({ json, invalidContent, transformers }) => {
588627
// Automatically remove all invalid nodes and marks.

0 commit comments

Comments
 (0)