Skip to content
Merged
Show file tree
Hide file tree
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
9 changes: 0 additions & 9 deletions packages/editor/src/ce/extensions/index.ts

This file was deleted.

25 changes: 0 additions & 25 deletions packages/editor/src/ce/helpers/parser.ts

This file was deleted.

7 changes: 0 additions & 7 deletions packages/editor/src/ce/types/asset.ts

This file was deleted.

7 changes: 0 additions & 7 deletions packages/editor/src/ce/types/config.ts

This file was deleted.

9 changes: 0 additions & 9 deletions packages/editor/src/ce/types/index.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { getEditorClassNames } from "@/helpers/common";
// hooks
import { useEditor } from "@/hooks/use-editor";
// plane editor extensions
import { DocumentEditorAdditionalExtensions } from "@/plane-editor/extensions";
import { DocumentEditorAdditionalExtensions } from "@/extensions/document-extensions";
// types
import type { EditorRefApi, IDocumentEditorProps } from "@/types";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { DEFAULT_DISPLAY_CONFIG } from "@/constants/config";
import { CORE_EXTENSIONS } from "@/constants/extension";
// components
import type { TCollabValue } from "@/contexts";
import { LinkContainer } from "@/plane-editor/components/link-container";
import { LinkContainer } from "@/components/link-container";
// plugins
import { nodeHighlightPluginKey } from "@/plugins/highlight";
// types
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { BlockMenu, EditorBubbleMenu } from "@/components/menus";
// extensions
import { SideMenuExtension } from "@/extensions";
// plane editor imports
import { RichTextEditorAdditionalExtensions } from "@/plane-editor/extensions/rich-text-extensions";
import { RichTextEditorAdditionalExtensions } from "@/extensions/rich-text-extensions";
// types
import type { EditorRefApi, IRichTextEditorProps } from "@/types";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import type { ADDITIONAL_EXTENSIONS } from "@plane/utils";
import { CORE_EXTENSIONS } from "@plane/utils";
// plane editor imports
import type { ExtensionFileSetStorageKey } from "@/plane-editor/types/storage";
import type { ExtensionFileSetStorageKey } from "@/types/storage";

export type NodeFileMapType = Partial<
Record<
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/src/core/extensions/core-without-props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import TaskList from "@tiptap/extension-task-list";
import { TextStyle } from "@tiptap/extension-text-style";
import { Underline } from "@tiptap/extension-underline";
// plane editor imports
import { CoreEditorAdditionalExtensionsWithoutProps } from "@/plane-editor/extensions/core/without-props";
import { CoreEditorAdditionalExtensionsWithoutProps } from "@/extensions/core/without-props";
// extensions
import { CustomCalloutExtensionConfig } from "./callout/extension-config";
import { CustomCodeBlockExtensionWithoutProps } from "./code/without-props";
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/src/core/extensions/extensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import {
UtilityExtension,
} from "@/extensions";
// plane editor extensions
import { CoreEditorAdditionalExtensions } from "@/plane-editor/extensions";
import { CoreEditorAdditionalExtensions } from "@/extensions/core";
// types
import type { IEditorProps } from "@/types";
// local imports
Expand Down
3 changes: 3 additions & 0 deletions packages/editor/src/core/extensions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ export * from "./quote";
export * from "./side-menu";
export * from "./text-align";
export * from "./utility";
export * from "./core";
export * from "./document-extensions";
export * from "./additional-slash-command-options";
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import {
openEmojiPicker,
} from "@/helpers/editor-commands";
// plane editor extensions
import { coreEditorAdditionalSlashCommandOptions } from "@/plane-editor/extensions";
import { coreEditorAdditionalSlashCommandOptions } from "@/extensions/additional-slash-command-options";
// types
import type { CommandProps, ISlashCommandItem, TSlashCommandSectionKeys } from "@/types";
// local types
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/src/core/extensions/unique-id/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import type { Transaction } from "@tiptap/pm/state";
import { v4 as uuidv4 } from "uuid";
// constants
import { CORE_EXTENSIONS, BLOCK_NODE_TYPES } from "@/constants/extension";
import { ADDITIONAL_BLOCK_NODE_TYPES } from "@/plane-editor/constants/extensions";
import { ADDITIONAL_BLOCK_NODE_TYPES } from "@/constants/extensions";
import { createUniqueIDPlugin } from "./plugin";
import { createIdsForView } from "./utils";
// plane imports
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/src/core/extensions/utility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import codemark from "prosemirror-codemark";
import { CORE_EXTENSIONS } from "@/constants/extension";
import { restorePublicImages } from "@/helpers/image-helpers";
// plugins
import type { TAdditionalActiveDropbarExtensions } from "@/plane-editor/types/utils";
import type { TAdditionalActiveDropbarExtensions } from "@/types/utils";
import { DropHandlerPlugin } from "@/plugins/drop";
import { FilePlugins } from "@/plugins/file/root";
import { MarkdownClipboardPlugin } from "@/plugins/markdown-clipboard";
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/src/core/helpers/assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { CORE_EXTENSIONS } from "@plane/utils";
// extensions
import { getImageBlockId } from "@/extensions/custom-image/utils";
// plane editor imports
import { ADDITIONAL_ASSETS_META_DATA_RECORD } from "@/plane-editor/constants/assets";
import { ADDITIONAL_ASSETS_META_DATA_RECORD } from "@/constants/assets";
// types
import type { TEditorAsset } from "@/types";

Expand Down
25 changes: 20 additions & 5 deletions packages/editor/src/core/helpers/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,29 @@

// plane imports
import type { TDocumentPayload, TDuplicateAssetData, TDuplicateAssetResponse, TEditorAssetType } from "@plane/types";
// plane web imports
import {
extractAdditionalAssetsFromHTMLContent,
replaceAdditionalAssetsInHTMLContent,
} from "@/plane-editor/helpers/parser";
// local imports
import { convertHTMLDocumentToAllFormats } from "./yjs-utils";

/**
* @description function to extract all additional assets from HTML content
* @param htmlContent
* @returns {string[]} array of additional asset sources
*/
export const extractAdditionalAssetsFromHTMLContent = (_htmlContent: string): string[] => [];

/**
* @description function to replace additional assets in HTML content with new IDs
* @param props
* @returns {string} HTML content with replaced additional assets
*/
export const replaceAdditionalAssetsInHTMLContent = (props: {
htmlContent: string;
assetMap: Record<string, string>;
}): string => {
const { htmlContent } = props;
return htmlContent;
};

/**
* @description function to extract all assets from HTML content
* @param htmlContent
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/src/core/helpers/paste-asset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* See the LICENSE file for details.
*/

import { assetDuplicationHandlers } from "@/plane-editor/helpers/asset-duplication";
import { assetDuplicationHandlers } from "@/helpers/asset-duplication";

// Utility function to process HTML content with all registered handlers
export const processAssetDuplication = (htmlContent: string): { processedHtml: string } => {
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/src/core/hooks/use-collaborative-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { HeadingListExtension, SideMenuExtension } from "@/extensions";
// hooks
import { useEditor } from "@/hooks/use-editor";
// plane editor extensions
import { DocumentEditorAdditionalExtensions } from "@/plane-editor/extensions";
import { DocumentEditorAdditionalExtensions } from "@/extensions/document-extensions";
// types
import type {
TCollaborativeEditorHookProps,
Expand Down
4 changes: 2 additions & 2 deletions packages/editor/src/core/plugins/file/delete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import type { EditorState, Transaction } from "@tiptap/pm/state";
// constants
import { CORE_EDITOR_META } from "@/constants/meta";
// plane editor imports
import { NODE_FILE_MAP } from "@/plane-editor/constants/utility";
import { NODE_FILE_MAP } from "@/constants/utility";
// types
import type { TFileHandler } from "@/types";
// local imports
import type { NodeFileMapType } from "../../../ce/constants/utility";
import type { NodeFileMapType } from "../../constants/utility";
import type { TFileNode } from "./types";

const DELETE_PLUGIN_KEY = new PluginKey("delete-utility");
Expand Down
4 changes: 2 additions & 2 deletions packages/editor/src/core/plugins/file/restore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ import { CORE_EXTENSIONS } from "@plane/utils";
// helpers
import { CORE_ASSETS_META_DATA_RECORD } from "@/helpers/assets";
// plane editor imports
import { NODE_FILE_MAP } from "@/plane-editor/constants/utility";
import { NODE_FILE_MAP } from "@/constants/utility";
// types
import type { TFileHandler } from "@/types";
// local imports
import type { NodeFileMapType } from "../../../ce/constants/utility";
import type { NodeFileMapType } from "../../constants/utility";
import type { TFileNode } from "./types";

const RESTORE_PLUGIN_KEY = new PluginKey("restore-utility");
Expand Down
4 changes: 2 additions & 2 deletions packages/editor/src/core/types/asset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

// constants
import type { CORE_EXTENSIONS } from "@/constants/extension";
// plane editor imports
import type { TAdditionalEditorAsset } from "@/plane-editor/types/asset";

export type TAdditionalEditorAsset = never;

export type TEditorImageAsset = {
href: string;
Expand Down
3 changes: 1 addition & 2 deletions packages/editor/src/core/types/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
* See the LICENSE file for details.
*/

// plane imports
import type { TExtendedFileHandler } from "@/plane-editor/types/config";
export type TExtendedFileHandler = object;

export type TFileHandler = {
assetsUploadStatus: Record<string, number>; // blockId => progress percentage
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/src/core/types/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import type {
IEditorPropsExtended,
TExtendedEditorCommands,
ICollaborativeDocumentEditorPropsExtended,
} from "@/plane-editor/types/editor-extended";
} from "@/types/editor-extended";
// types
import type {
IMarking,
Expand Down
4 changes: 2 additions & 2 deletions packages/editor/src/core/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ export * from "./hook";
export * from "./mention";
export * from "./slash-commands-suggestion";
export * from "./document-collaborative-events";

export * from "@/plane-editor/types";
export * from "./issue-embed";
export * from "./editor-extended";
7 changes: 0 additions & 7 deletions packages/editor/src/ee/extensions/index.ts

This file was deleted.

7 changes: 0 additions & 7 deletions packages/editor/src/ee/types/index.ts

This file was deleted.

2 changes: 1 addition & 1 deletion packages/editor/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export * from "@/helpers/common";
export * from "@/helpers/yjs-utils";

export { CORE_EXTENSIONS } from "@/constants/extension";
export { ADDITIONAL_EXTENSIONS } from "@/plane-editor/constants/extensions";
export { ADDITIONAL_EXTENSIONS } from "@/constants/extensions";

// types
export * from "@/types";
Expand Down
2 changes: 0 additions & 2 deletions packages/editor/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
"noUnusedLocals": false,
"noUnusedParameters": false,
"paths": {
"src/*": ["./src/*"],
"@/*": ["./src/core/*"],
"@/plane-editor/*": ["./src/ce/*"],
"@/styles/*": ["./src/styles/*"]
}
},
Expand Down
Loading