Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 5 additions & 50 deletions packages/editor/src/core/extensions/core-without-props.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import TaskItem from "@tiptap/extension-task-item";
import TaskList from "@tiptap/extension-task-list";
import { TextStyle } from "@tiptap/extension-text-style";
import StarterKit from "@tiptap/starter-kit";
// helpers
import { isValidHttpUrl } from "@/helpers/common";
// plane editor imports
import { CoreEditorAdditionalExtensionsWithoutProps } from "@/plane-editor/extensions/core/without-props";
// extensions
Expand All @@ -18,61 +15,19 @@ import { CustomHorizontalRule } from "./horizontal-rule";
import { ImageExtensionConfig } from "./image";
import { CustomMentionExtensionConfig } from "./mentions/extension-config";
import { CustomQuoteExtension } from "./quote";
import { CustomStarterKitExtension } from "./starter-kit";
Copy link

Copilot AI Oct 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CustomStarterKitExtension import is added but the corresponding file './starter-kit' may not exist or may not export this function. This could cause a runtime error if the module is not properly implemented.

Copilot uses AI. Check for mistakes.
import { TableHeader, TableCell, TableRow, Table } from "./table";
import { CustomTextAlignExtension } from "./text-align";
import { WorkItemEmbedExtensionConfig } from "./work-item-embed/extension-config";

export const CoreEditorExtensionsWithoutProps = [
StarterKit.configure({
bulletList: {
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,
CustomStarterKitExtension({
enableHistory: true,
}),
EmojiExtension,
CustomQuoteExtension,
CustomHorizontalRule.configure({
HTMLAttributes: {
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",
},
}),
CustomHorizontalRule,
CustomLinkExtension,
Comment on lines +29 to +30
Copy link

Copilot AI Oct 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CustomHorizontalRule and CustomLinkExtension are now used without their previous configurations. This removes important styling (CSS classes) and functionality (link validation, protocols). The removed configurations should be preserved either in the CustomStarterKitExtension or applied here to maintain the same behavior.

Suggested change
CustomHorizontalRule,
CustomLinkExtension,
CustomHorizontalRule.configure({
HTMLAttributes: {
class: "my-4 border-t border-gray-300", // Example, replace with your actual class
},
}),
CustomLinkExtension.configure({
HTMLAttributes: {
class: "text-blue-600 underline", // Example, replace with your actual class
},
validate: href => {
// Example validation: allow only http, https, mailto, and tel
return /^(https?:\/\/|mailto:|tel:)/.test(href);
},
protocols: ['http', 'https', 'mailto', 'tel'],
}),

Copilot uses AI. Check for mistakes.
ImageExtensionConfig,
CustomImageExtensionConfig,
TextStyle,
Expand Down
Loading