Skip to content

Commit

Permalink
feat(editorConfig.ts): remove DownloadLinkNode and its related code
Browse files Browse the repository at this point in the history
This change removes the DownloadLinkNode and its related code from the editor configuration. The DownloadLinkNode was a custom node that extended the LinkNode to handle download links. However, it was decided that this functionality was not needed, so the node and its related code were removed to simplify the editor configuration.
  • Loading branch information
ktun95 committed Mar 7, 2025
1 parent 8e28a14 commit bd3e6c0
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions packages/editor/src/editorConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { LinkNode } from "@lexical/link"
import { ImageNode } from "@dictybase/image-plugin"
import { WidthTableNode } from "@dictybase/width-table-plugin"
import { FlexLayoutNode } from "@dictybase/flex-layout-plugin"
import { DownloadLinkNode } from "@dictybase/editor-toolbar"

const editorTheme = {
paragraph: "editor-paragraph",
Expand All @@ -30,26 +29,14 @@ const dictyEditorConfig = {
nodes: [
HeadingNode,
QuoteNode,
LinkNode,
ListItemNode,
ListNode,
ImageNode,
TableCellNode,
TableRowNode,
WidthTableNode,
FlexLayoutNode,
DownloadLinkNode,
{
replace: LinkNode,
with: (node: LinkNode) => {
const attributes = {
rel: node.__rel,
target: node.__target,
title: node.__title,
}
return new DownloadLinkNode(node.__url, attributes)
},
withKlass: DownloadLinkNode,
},
],
onError,
}
Expand Down

0 comments on commit bd3e6c0

Please sign in to comment.