mirror of
https://github.com/makeplane/plane.git
synced 2026-01-30 10:23:26 -06:00
[WIKI-640] chore: refactor link view #7727
This commit is contained in:
14
packages/editor/src/ce/components/link-container.tsx
Normal file
14
packages/editor/src/ce/components/link-container.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { Editor } from "@tiptap/core";
|
||||
import { LinkViewContainer } from "@/components/editors/link-view-container";
|
||||
|
||||
export const LinkContainer = ({
|
||||
editor,
|
||||
containerRef,
|
||||
}: {
|
||||
editor: Editor;
|
||||
containerRef: React.RefObject<HTMLDivElement>;
|
||||
}) => (
|
||||
<>
|
||||
<LinkViewContainer editor={editor} containerRef={containerRef} />
|
||||
</>
|
||||
);
|
||||
@@ -5,10 +5,10 @@ import { cn } from "@plane/utils";
|
||||
// constants
|
||||
import { DEFAULT_DISPLAY_CONFIG } from "@/constants/config";
|
||||
import { CORE_EXTENSIONS } from "@/constants/extension";
|
||||
// components
|
||||
import { LinkContainer } from "@/plane-editor/components/link-container";
|
||||
// types
|
||||
import { TDisplayConfig } from "@/types";
|
||||
// components
|
||||
import { LinkViewContainer } from "./link-view-container";
|
||||
|
||||
type Props = {
|
||||
children: ReactNode;
|
||||
@@ -95,7 +95,7 @@ export const EditorContainer: FC<Props> = (props) => {
|
||||
)}
|
||||
>
|
||||
{children}
|
||||
{!isTouchDevice && <LinkViewContainer editor={editor} containerRef={containerRef} />}
|
||||
{!isTouchDevice && <LinkContainer editor={editor} containerRef={containerRef} />}
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user