[WIKI-569] regression: parser kit extensions mismatch #7885
This commit is contained in:
parent
b37e453b32
commit
931a48d7d7
1 changed files with 5 additions and 50 deletions
|
|
@ -1,9 +1,6 @@
|
||||||
import TaskItem from "@tiptap/extension-task-item";
|
import TaskItem from "@tiptap/extension-task-item";
|
||||||
import TaskList from "@tiptap/extension-task-list";
|
import TaskList from "@tiptap/extension-task-list";
|
||||||
import { TextStyle } from "@tiptap/extension-text-style";
|
import { TextStyle } from "@tiptap/extension-text-style";
|
||||||
import StarterKit from "@tiptap/starter-kit";
|
|
||||||
// helpers
|
|
||||||
import { isValidHttpUrl } from "@/helpers/common";
|
|
||||||
// plane editor imports
|
// plane editor imports
|
||||||
import { CoreEditorAdditionalExtensionsWithoutProps } from "@/plane-editor/extensions/core/without-props";
|
import { CoreEditorAdditionalExtensionsWithoutProps } from "@/plane-editor/extensions/core/without-props";
|
||||||
// extensions
|
// extensions
|
||||||
|
|
@ -18,61 +15,19 @@ import { CustomHorizontalRule } from "./horizontal-rule";
|
||||||
import { ImageExtensionConfig } from "./image";
|
import { ImageExtensionConfig } from "./image";
|
||||||
import { CustomMentionExtensionConfig } from "./mentions/extension-config";
|
import { CustomMentionExtensionConfig } from "./mentions/extension-config";
|
||||||
import { CustomQuoteExtension } from "./quote";
|
import { CustomQuoteExtension } from "./quote";
|
||||||
|
import { CustomStarterKitExtension } from "./starter-kit";
|
||||||
import { TableHeader, TableCell, TableRow, Table } from "./table";
|
import { TableHeader, TableCell, TableRow, Table } from "./table";
|
||||||
import { CustomTextAlignExtension } from "./text-align";
|
import { CustomTextAlignExtension } from "./text-align";
|
||||||
import { WorkItemEmbedExtensionConfig } from "./work-item-embed/extension-config";
|
import { WorkItemEmbedExtensionConfig } from "./work-item-embed/extension-config";
|
||||||
|
|
||||||
export const CoreEditorExtensionsWithoutProps = [
|
export const CoreEditorExtensionsWithoutProps = [
|
||||||
StarterKit.configure({
|
CustomStarterKitExtension({
|
||||||
bulletList: {
|
enableHistory: true,
|
||||||
HTMLAttributes: {
|
|
||||||
class: "list-disc pl-7 space-y-[--list-spacing-y]",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
orderedList: {
|
|
||||||
HTMLAttributes: {
|
|
||||||
class: "list-decimal pl-7 space-y-[--list-spacing-y]",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
listItem: {
|
|
||||||
HTMLAttributes: {
|
|
||||||
class: "not-prose space-y-2",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
code: false,
|
|
||||||
codeBlock: false,
|
|
||||||
horizontalRule: false,
|
|
||||||
blockquote: false,
|
|
||||||
paragraph: {
|
|
||||||
HTMLAttributes: {
|
|
||||||
class: "editor-paragraph-block",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
heading: {
|
|
||||||
HTMLAttributes: {
|
|
||||||
class: "editor-heading-block",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
dropcursor: false,
|
|
||||||
}),
|
}),
|
||||||
EmojiExtension,
|
EmojiExtension,
|
||||||
CustomQuoteExtension,
|
CustomQuoteExtension,
|
||||||
CustomHorizontalRule.configure({
|
CustomHorizontalRule,
|
||||||
HTMLAttributes: {
|
CustomLinkExtension,
|
||||||
class: "py-4 border-custom-border-400",
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
CustomLinkExtension.configure({
|
|
||||||
openOnClick: true,
|
|
||||||
autolink: true,
|
|
||||||
linkOnPaste: true,
|
|
||||||
protocols: ["http", "https"],
|
|
||||||
validate: (url: string) => isValidHttpUrl(url).isValid,
|
|
||||||
HTMLAttributes: {
|
|
||||||
class:
|
|
||||||
"text-custom-primary-300 underline underline-offset-[3px] hover:text-custom-primary-500 transition-colors cursor-pointer",
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
ImageExtensionConfig,
|
ImageExtensionConfig,
|
||||||
CustomImageExtensionConfig,
|
CustomImageExtensionConfig,
|
||||||
TextStyle,
|
TextStyle,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue