Skip to content

armgit / plane

Public Imported from GitHub
0

πŸ”₯πŸ”₯πŸ”₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.

fix: issue embed option in slash command (#4938)

Aaryan Khandelwaldbd77561630e
diff --git a/packages/editor/src/ce/extensions/document-extensions.tsx b/packages/editor/src/ce/extensions/document-extensions.tsx
index efb6618db1..57583e60a2 100644
--- a/packages/editor/src/ce/extensions/document-extensions.tsx
+++ b/packages/editor/src/ce/extensions/document-extensions.tsx
@@ -1,11 +1,8 @@
-import { LayersIcon } from "lucide-react";
import { SlashCommand } from "@/extensions";
// hooks
import { TFileHandler } from "@/hooks/use-editor";
// plane editor types
import { TIssueEmbedConfig } from "@/plane-editor/types";
-// types
-import { ISlashCommandItem } from "@/types";
type Props = {
fileHandler: TFileHandler;
@@ -15,27 +12,7 @@ type Props = {
export const DocumentEditorAdditionalExtensions = (props: Props) => {
const { fileHandler } = props;
- const slashCommandAdditionalOptions: ISlashCommandItem[] = [
- {
- key: "issue_embed",
- title: "Issue embed",
- description: "Embed an issue from the project.",
- searchTerms: ["issue", "link", "embed"],
- icon: <LayersIcon className="h-3.5 w-3.5" />,
- command: ({ editor, range }) => {
- editor
- .chain()
- .focus()
- .insertContentAt(
- range,
- "<p class='text-sm bg-gray-300 w-fit pl-3 pr-3 pt-1 pb-1 rounded shadow-sm'>#issue_</p>"
- )
- .run();
- },
- },
- ];
-
- const extensions = [SlashCommand(fileHandler.upload, slashCommandAdditionalOptions)];
+ const extensions = [SlashCommand(fileHandler.upload)];
return extensions;
};