Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pulling feat/editor-links into develop #771

Open
wants to merge 16 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
427189e
feat(editorConfig.ts): add AutoLinkNode import to support automatic l…
ktun95 May 12, 2024
ab1df63
feat(editor-toolbar): add InsertLinkButton component to the project
ktun95 May 13, 2024
9a543b0
feat(editor-toolbar): add InsertLinkButton component to the Dictybase…
ktun95 May 13, 2024
240c741
fix(InsertLinkButton.tsx): replace incorrect component name in IconBu…
ktun95 May 13, 2024
e19d35f
feat(InsertLinkButton.tsx): add functionality to insert a link in the…
ktun95 May 13, 2024
2246ace
chore(editor-toolbar): add ts-pattern package as a dependency
ktun95 May 13, 2024
9c83080
feat(useLinkProperties.tsx): add a custom hook useLinkProperties to m…
ktun95 May 13, 2024
1fa212e
feat(editor-toolbar): add isLinkAtom to manage link formatting in edi…
ktun95 May 13, 2024
e52aa8a
feat(useUpdateToolbar): add support for updating link properties in t…
ktun95 May 13, 2024
e0c50f9
feat(Editor.tsx): add LinkPlugin to support adding hyperlinks in the …
ktun95 May 13, 2024
4a8a67f
feat(InsertLinkButton.tsx): add functionality to toggle link creation…
ktun95 May 13, 2024
73934b9
feat(InsertLinkButton.tsx): add EditingLinkPopper component to Insert…
ktun95 May 14, 2024
826720d
feat(EditingLinkPopper.tsx): add a new component EditingLinkPopper to…
ktun95 May 14, 2024
573aec6
style(EditingLinkPopper.tsx): improve variable naming for clarity and…
ktun95 May 14, 2024
870173c
refactor(EditingLinkPopper.tsx): optimize code by removing unused sta…
ktun95 May 14, 2024
02c471c
feat(InsertLinkButton.tsx): add useRef hook to manage a reference to …
ktun95 May 14, 2024
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
3 changes: 2 additions & 1 deletion packages/editor-toolbar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"fp-ts": "^2.16.0",
"jotai-optics": "^0.3.0",
"optics-ts": "^2.4.1",
"image-plugin": "*"
"image-plugin": "*",
"ts-pattern": "^4.0"
},
"devDependencies": {
"@testing-library/react": "^12.x",
Expand Down
79 changes: 79 additions & 0 deletions packages/editor-toolbar/src/components/EditingLinkPopper.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
import { useState, useEffect } from "react"

Check failure on line 1 in packages/editor-toolbar/src/components/EditingLinkPopper.tsx

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

packages/editor-toolbar/src/components/EditingLinkPopper.tsx#L1

[@typescript-eslint/no-unused-vars] 'useState' is defined but never used.

Check failure on line 1 in packages/editor-toolbar/src/components/EditingLinkPopper.tsx

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

packages/editor-toolbar/src/components/EditingLinkPopper.tsx#L1

[@typescript-eslint/no-unused-vars] 'useEffect' is defined but never used.
import { Popper, TextField, Paper } from "@material-ui/core"
import { $getSelection } from "lexical"

Check failure on line 3 in packages/editor-toolbar/src/components/EditingLinkPopper.tsx

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

packages/editor-toolbar/src/components/EditingLinkPopper.tsx#L3

[import/no-duplicates] '/home/runner/work/frontendx/frontendx/node_modules/lexical/Lexical.js' imported multiple times.
import { useAtomValue } from "jotai"
import { $isLinkNode, LinkNode } from "@lexical/link"

Check failure on line 5 in packages/editor-toolbar/src/components/EditingLinkPopper.tsx

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

packages/editor-toolbar/src/components/EditingLinkPopper.tsx#L5

[@typescript-eslint/no-unused-vars] 'LinkNode' is defined but never used.
import {
TextNode,

Check failure on line 7 in packages/editor-toolbar/src/components/EditingLinkPopper.tsx

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

packages/editor-toolbar/src/components/EditingLinkPopper.tsx#L7

[@typescript-eslint/no-unused-vars] 'TextNode' is defined but never used.
$isRangeSelection,
$isTextNode,
LexicalEditor,
} from "lexical"

Check failure on line 11 in packages/editor-toolbar/src/components/EditingLinkPopper.tsx

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

packages/editor-toolbar/src/components/EditingLinkPopper.tsx#L11

[import/no-duplicates] '/home/runner/work/frontendx/frontendx/node_modules/lexical/Lexical.js' imported multiple times.
import {
head as Ahead,
reduce as Areduce,

Check failure on line 14 in packages/editor-toolbar/src/components/EditingLinkPopper.tsx

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

packages/editor-toolbar/src/components/EditingLinkPopper.tsx#L14

[@typescript-eslint/no-unused-vars] 'Areduce' is defined but never used.
map as Amap,

Check failure on line 15 in packages/editor-toolbar/src/components/EditingLinkPopper.tsx

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

packages/editor-toolbar/src/components/EditingLinkPopper.tsx#L15

[@typescript-eslint/no-unused-vars] 'Amap' is defined but never used.
filter as Afilter,
} from "fp-ts/Array"
import {
fromNullable as OfromNullable,
toNullable as OtoNullable,

Check failure on line 20 in packages/editor-toolbar/src/components/EditingLinkPopper.tsx

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

packages/editor-toolbar/src/components/EditingLinkPopper.tsx#L20

[@typescript-eslint/no-unused-vars] 'OtoNullable' is defined but never used.
getOrElse as OgetOrElse,

Check failure on line 21 in packages/editor-toolbar/src/components/EditingLinkPopper.tsx

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

packages/editor-toolbar/src/components/EditingLinkPopper.tsx#L21

[@typescript-eslint/no-unused-vars] 'OgetOrElse' is defined but never used.
bindTo as ObindTo,

Check failure on line 22 in packages/editor-toolbar/src/components/EditingLinkPopper.tsx

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

packages/editor-toolbar/src/components/EditingLinkPopper.tsx#L22

[@typescript-eslint/no-unused-vars] 'ObindTo' is defined but never used.
bind as Obind,
let as Olet,

Check failure on line 24 in packages/editor-toolbar/src/components/EditingLinkPopper.tsx

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

packages/editor-toolbar/src/components/EditingLinkPopper.tsx#L24

[@typescript-eslint/no-unused-vars] 'Olet' is defined but never used.
Do as ODo,
map as Omap,
none,
} from "fp-ts/Option"
import { MonoidAll } from "fp-ts/boolean"
import { pipe } from "fp-ts/function"
import { isLinkAtom } from "../context/atomConfigs"
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext"

Check failure on line 32 in packages/editor-toolbar/src/components/EditingLinkPopper.tsx

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

packages/editor-toolbar/src/components/EditingLinkPopper.tsx#L32

[import/order] `@lexical/react/LexicalComposerContext` import should occur before import of `../context/atomConfigs`

const getAnchorElement = (editor: LexicalEditor) => {

Check failure on line 34 in packages/editor-toolbar/src/components/EditingLinkPopper.tsx

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

packages/editor-toolbar/src/components/EditingLinkPopper.tsx#L34

[@typescript-eslint/no-unused-vars] 'getAnchorElement' is assigned a value but never used.
const selection = $getSelection()
if (!$isRangeSelection(selection)) return none
return pipe(
ODo,
Obind("textNode", () =>
pipe(selection.getNodes(), Afilter($isTextNode), Ahead),
),
Obind("linkNode", ({ textNode }) =>
pipe(textNode.getParents(), Afilter($isLinkNode), Ahead),
),
Obind("anchorElement", ({ linkNode }) =>
OfromNullable(linkNode.exportDOM(editor).element),
),
Omap(({ anchorElement }) => anchorElement),
)
}

type EditingLinkPopper = {
anchorElement: HTMLElement | null
}

const EditingLinkPopper = ({ anchorElement }: EditingLinkPopper) => {

Check failure on line 56 in packages/editor-toolbar/src/components/EditingLinkPopper.tsx

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

packages/editor-toolbar/src/components/EditingLinkPopper.tsx#L56

[no-redeclare] 'EditingLinkPopper' is already defined.

Check warning on line 56 in packages/editor-toolbar/src/components/EditingLinkPopper.tsx

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

packages/editor-toolbar/src/components/EditingLinkPopper.tsx#L56

[@typescript-eslint/no-redeclare] 'EditingLinkPopper' is already defined.
const [editor] = useLexicalComposerContext()
// const [anchorElement, setAnchorElement] = useState<HTMLElement | null>(null)
const isLink = useAtomValue(isLinkAtom)
const isOpen = MonoidAll.concat(isLink as boolean, editor.isEditable())
console.log(anchorElement)

Check failure on line 61 in packages/editor-toolbar/src/components/EditingLinkPopper.tsx

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

packages/editor-toolbar/src/components/EditingLinkPopper.tsx#L61

[no-console] Unexpected console statement.
// anchorElement needs to be set before open

Check failure on line 62 in packages/editor-toolbar/src/components/EditingLinkPopper.tsx

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

packages/editor-toolbar/src/components/EditingLinkPopper.tsx#L62

[prettier/prettier] Insert `··`
// useEffect(() => {

Check failure on line 63 in packages/editor-toolbar/src/components/EditingLinkPopper.tsx

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

packages/editor-toolbar/src/components/EditingLinkPopper.tsx#L63

[prettier/prettier] Insert `·`
// editor.registerUpdateListener(({ editorState }) => {

Check failure on line 64 in packages/editor-toolbar/src/components/EditingLinkPopper.tsx

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

packages/editor-toolbar/src/components/EditingLinkPopper.tsx#L64

[prettier/prettier] Insert `·`
// editorState.read(() => {

Check failure on line 65 in packages/editor-toolbar/src/components/EditingLinkPopper.tsx

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

packages/editor-toolbar/src/components/EditingLinkPopper.tsx#L65

[prettier/prettier] Insert `·`
// setAnchorElement(pipe(editor, getAnchorElement, OtoNullable))

Check failure on line 66 in packages/editor-toolbar/src/components/EditingLinkPopper.tsx

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

packages/editor-toolbar/src/components/EditingLinkPopper.tsx#L66

[prettier/prettier] Insert `·`
// })

Check failure on line 67 in packages/editor-toolbar/src/components/EditingLinkPopper.tsx

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

packages/editor-toolbar/src/components/EditingLinkPopper.tsx#L67

[prettier/prettier] Insert `·`
// })

Check failure on line 68 in packages/editor-toolbar/src/components/EditingLinkPopper.tsx

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

packages/editor-toolbar/src/components/EditingLinkPopper.tsx#L68

[prettier/prettier] Insert `·`
// }, [editor, setAnchorElement])

Check failure on line 69 in packages/editor-toolbar/src/components/EditingLinkPopper.tsx

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

packages/editor-toolbar/src/components/EditingLinkPopper.tsx#L69

[prettier/prettier] Insert `·`
return (
<Popper anchorEl={anchorElement} open={isOpen}>

Check failure on line 71 in packages/editor-toolbar/src/components/EditingLinkPopper.tsx

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

packages/editor-toolbar/src/components/EditingLinkPopper.tsx#L71

[prettier/prettier] Replace `······` with `····`
<Paper>

Check failure on line 72 in packages/editor-toolbar/src/components/EditingLinkPopper.tsx

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

packages/editor-toolbar/src/components/EditingLinkPopper.tsx#L72

[prettier/prettier] Delete `··`
<TextField />

Check failure on line 73 in packages/editor-toolbar/src/components/EditingLinkPopper.tsx

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

packages/editor-toolbar/src/components/EditingLinkPopper.tsx#L73

[prettier/prettier] Delete `··`
</Paper>

Check failure on line 74 in packages/editor-toolbar/src/components/EditingLinkPopper.tsx

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

packages/editor-toolbar/src/components/EditingLinkPopper.tsx#L74

[prettier/prettier] Delete `··`
</Popper>

Check failure on line 75 in packages/editor-toolbar/src/components/EditingLinkPopper.tsx

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

packages/editor-toolbar/src/components/EditingLinkPopper.tsx#L75

[prettier/prettier] Delete `··`
)
}

export { EditingLinkPopper }
41 changes: 41 additions & 0 deletions packages/editor-toolbar/src/components/InsertLinkButton.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import { useRef } from "react"
import { IconButton } from "@material-ui/core"
import InsertLinkIcon from "@material-ui/icons/InsertLink"
import { TOGGLE_LINK_COMMAND } from "@lexical/link"
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext"
import { useAtom } from "jotai"
import { match } from "ts-pattern"
import { EditingLinkPopper } from "./EditingLinkPopper"
import { isLinkAtom } from "../context/atomConfigs"
import { useActiveClass } from "../hooks/useActiveClass"

const InsertLinkButton = () => {
const [editor] = useLexicalComposerContext()
const [isLink, setIsLink] = useAtom(isLinkAtom)

Check failure on line 14 in packages/editor-toolbar/src/components/InsertLinkButton.tsx

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

packages/editor-toolbar/src/components/InsertLinkButton.tsx#L14

[@typescript-eslint/no-unused-vars] 'setIsLink' is assigned a value but never used.
const isActive = useActiveClass(isLinkAtom)
const ref = useRef(null)

Check failure on line 16 in packages/editor-toolbar/src/components/InsertLinkButton.tsx

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

packages/editor-toolbar/src/components/InsertLinkButton.tsx#L16

[unicorn/prevent-abbreviations] The variable `ref` should be named `reference`. A more descriptive name will do too.

const onClick = () => {
editor.update(() => {
match(isLink)
.with(true, () => {
editor.dispatchCommand(TOGGLE_LINK_COMMAND, null)

Check failure on line 22 in packages/editor-toolbar/src/components/InsertLinkButton.tsx

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

packages/editor-toolbar/src/components/InsertLinkButton.tsx#L22

[unicorn/no-null] Use `undefined` instead of `null`.
})
.with(false, () => {
editor.dispatchCommand(TOGGLE_LINK_COMMAND, "")
})
.exhaustive()
})
}

return (
<>
<IconButton ref={ref} className={isActive} onClick={onClick}>
<InsertLinkIcon />
</IconButton>
<EditingLinkPopper anchorElement={ref.current}/>

Check failure on line 36 in packages/editor-toolbar/src/components/InsertLinkButton.tsx

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

packages/editor-toolbar/src/components/InsertLinkButton.tsx#L36

[prettier/prettier] Insert `·`
</>
)
}

export { InsertLinkButton }
3 changes: 3 additions & 0 deletions packages/editor-toolbar/src/context/atomConfigs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export const formatAtom = atom({
fontColor: "hsl(0, 0%, 0%)",
fontFamily: FontFamily.ARIAL,
blockType: BlockTypes.PARAGRAPH,
isLink: false,
})
export const isBoldAtom = focusAtom(formatAtom, (optic) => optic.prop("isBold"))
export const isItalicAtom = focusAtom(formatAtom, (optic) =>
Expand All @@ -67,6 +68,8 @@ export const blockTypeAtom = focusAtom(formatAtom, (optic) =>
optic.prop("blockType"),
)

export const isLinkAtom = focusAtom(formatAtom, (optic) => optic.prop("isLink"))

const historyAtom = atom({
canUndo: false,
canRedo: false,
Expand Down
35 changes: 35 additions & 0 deletions packages/editor-toolbar/src/hooks/useLinkProperties.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { useSetAtom } from "jotai"
import { useCallback } from "react"
import { $isLinkNode } from "@lexical/link"
import { $getSelection, $isRangeSelection, $isTextNode, LexicalNode } from "lexical"

Check failure on line 4 in packages/editor-toolbar/src/hooks/useLinkProperties.tsx

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

packages/editor-toolbar/src/hooks/useLinkProperties.tsx#L4

[prettier/prettier] Replace `·$getSelection,·$isRangeSelection,·$isTextNode,·LexicalNode·` with `⏎··$getSelection,⏎··$isRangeSelection,⏎··$isTextNode,⏎··LexicalNode,⏎`
import { pipe } from "fp-ts/function"
import { map as Amap, reduce as Areduce, filter as Afilter } from "fp-ts/Array"
import { MonoidAny } from "fp-ts/boolean"
import {
isLinkAtom,
} from "../context/atomConfigs"

Check failure on line 10 in packages/editor-toolbar/src/hooks/useLinkProperties.tsx

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

packages/editor-toolbar/src/hooks/useLinkProperties.tsx#L8-L10

[prettier/prettier] Replace `⏎··isLinkAtom,⏎` with `·isLinkAtom·`

const hasLinkNodeParent = (node: LexicalNode) => {
return pipe(
node.getParents(),
Amap((parent) => $isLinkNode(parent)),
Areduce(false, MonoidAny.concat)

Check failure on line 16 in packages/editor-toolbar/src/hooks/useLinkProperties.tsx

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

packages/editor-toolbar/src/hooks/useLinkProperties.tsx#L16

[prettier/prettier] Insert `,`
)
}

Check failure on line 18 in packages/editor-toolbar/src/hooks/useLinkProperties.tsx

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

packages/editor-toolbar/src/hooks/useLinkProperties.tsx#L12-L18

[arrow-body-style] Unexpected block statement surrounding arrow body; move the returned value immediately after the `=>`.

const useLinkProperties = () => {
const setIsLink = useSetAtom(isLinkAtom)
return useCallback(() => {
const selection = $getSelection()
if (!$isRangeSelection(selection)) return
const isLink = pipe(
selection.getNodes(),
Afilter($isTextNode),
Amap((node) => hasLinkNodeParent(node)),
Areduce(false, MonoidAny.concat)

Check failure on line 29 in packages/editor-toolbar/src/hooks/useLinkProperties.tsx

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

packages/editor-toolbar/src/hooks/useLinkProperties.tsx#L29

[prettier/prettier] Insert `,`
)
setIsLink(isLink)
}, [setIsLink])
}

export { useLinkProperties }
4 changes: 4 additions & 0 deletions packages/editor-toolbar/src/hooks/useUpdateToolbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,24 @@
import { useFontProperties } from "./useFontProperties"
import { useFontColorProperties } from "./useFontColorProperties"
import { useBlockTypeProperties } from "./useBlockTypeProperties"
import { useLinkProperties } from "./useLinkProperties"

const useUpdateToolbar = () => {
const updateFontProperties = useFontProperties()
const updateTextColorProperties = useFontColorProperties()
const updateBlockTypeProperties = useBlockTypeProperties()
const updateLinkProperties = useLinkProperties()

Check failure on line 11 in packages/editor-toolbar/src/hooks/useUpdateToolbar.ts

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

packages/editor-toolbar/src/hooks/useUpdateToolbar.ts#L11

[prettier/prettier] Delete `·`

return useCallback(() => {
updateFontProperties()
updateTextColorProperties()
updateBlockTypeProperties()
updateLinkProperties()
}, [
updateBlockTypeProperties,
updateFontProperties,
updateTextColorProperties,
updateLinkProperties,
])
}

Expand Down
2 changes: 2 additions & 0 deletions packages/editor-toolbar/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { FormatUnderlineButton } from "./components/FormatUnderlineButton"
import { ColorPickerButton } from "./components/ColorPickerButton"
import { InsertTableButton } from "./components/InsertTableButton"
import { InsertImageButton } from "./components/InsertImageButton"
import { InsertLinkButton } from "./components/InsertLinkButton"
import { useCleanup } from "./hooks/useCleanup"
import { useToolbarStyles } from "./hooks/useToolbarStyles"

Expand All @@ -27,6 +28,7 @@ const DictybaseToolbar = () => {
<FormatItalicButton />
<FormatUnderlineButton />
<ColorPickerButton />
<InsertLinkButton />
<InsertTableButton />
<InsertImageButton />
</ToolBar>
Expand Down
2 changes: 2 additions & 0 deletions packages/editor/src/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
import { RichTextPlugin } from "@lexical/react/LexicalRichTextPlugin"
import { ContentEditable } from "@lexical/react/LexicalContentEditable"
import { ListPlugin } from "@lexical/react/LexicalListPlugin"
import { LinkPlugin } from "@lexical/react/LexicalLinkPlugin"
import { HistoryPlugin } from "@lexical/react/LexicalHistoryPlugin"
import LexicalErrorBoundary from "@lexical/react/LexicalErrorBoundary"
import { Grid, Container, Button, makeStyles, Theme } from "@material-ui/core"
Expand Down Expand Up @@ -82,6 +83,7 @@ const Editor = ({
}}>
<>{plugins}</>
<ListPlugin />
<LinkPlugin />
<ImagePlugin />
<FlexLayoutPlugin />
<WidthTablePlugin />
Expand Down
3 changes: 2 additions & 1 deletion packages/editor/src/editorConfig.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ListItemNode, ListNode } from "@lexical/list"
import { HeadingNode, QuoteNode } from "@lexical/rich-text"
import { TableCellNode, TableRowNode } from "@lexical/table"
import { LinkNode } from "@lexical/link"
import { LinkNode, AutoLinkNode } from "@lexical/link"
import { ImageNode } from "image-plugin"
import { WidthTableNode } from "width-table-plugin"
import { FlexLayoutNode } from "flex-layout-plugin"
Expand Down Expand Up @@ -32,6 +32,7 @@ const dictyEditorConfig = {
ListItemNode,
ListNode,
LinkNode,
AutoLinkNode,
ImageNode,
TableCellNode,
TableRowNode,
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -18553,7 +18553,7 @@ ts-jest@^27.1.3:
semver "7.x"
yargs-parser "20.x"

[email protected]:
[email protected], ts-pattern@^4.0:
version "4.3.0"
resolved "https://registry.yarnpkg.com/ts-pattern/-/ts-pattern-4.3.0.tgz#7a995b39342f1b00d1507c2d2f3b90ea16e178a6"
integrity sha512-pefrkcd4lmIVR0LA49Imjf9DYLK8vtWhqBPA3Ya1ir8xCW0O2yjL9dsCVvI7pCodLC5q7smNpEtDR2yVulQxOg==
Expand Down
Loading