diff options
Diffstat (limited to 'util')
-rw-r--r-- | util/processOrg.tsx | 7 | ||||
-rw-r--r-- | util/uniorg.tsx | 11 |
2 files changed, 15 insertions, 3 deletions
diff --git a/util/processOrg.tsx b/util/processOrg.tsx index 1bab2cd..05142dd 100644 --- a/util/processOrg.tsx +++ b/util/processOrg.tsx @@ -7,7 +7,7 @@ import extractKeywords from 'uniorg-extract-keywords' import attachments from 'uniorg-attach' // rehypeHighlight does not have any types // @ts-expect-error -import highlight from 'rehype-highlight' +// import highlight from 'rehype-highlight' import katex from 'rehype-katex' import 'katex/dist/katex.css' import rehype2react from 'rehype-react' @@ -24,6 +24,7 @@ export interface ProcessedOrgProps { previewText: any nodeByCite: NodeByCite setSidebarHighlightedNode: any + openContextMenu: any } export const ProcessedOrg = (props: ProcessedOrgProps) => { @@ -34,6 +35,7 @@ export const ProcessedOrg = (props: ProcessedOrgProps) => { previewText, nodeByCite, previewNode, + openContextMenu, } = props const processor = unified() @@ -42,7 +44,7 @@ export const ProcessedOrg = (props: ProcessedOrgProps) => { .use(attachments) .use(uniorgSlug) .use(uniorg2rehype) - .use(highlight) + // .use(highlight) .use(katex) .use(rehype2react, { createElement: React.createElement, @@ -56,6 +58,7 @@ export const ProcessedOrg = (props: ProcessedOrgProps) => { href={`${href as string}`} nodeById={nodeById} setPreviewNode={setPreviewNode} + openContextMenu={openContextMenu} > {children} </PreviewLink> diff --git a/util/uniorg.tsx b/util/uniorg.tsx index 217bad1..8802dd1 100644 --- a/util/uniorg.tsx +++ b/util/uniorg.tsx @@ -9,10 +9,18 @@ export interface UniOrgProps { setPreviewNode: any nodeByCite: NodeByCite setSidebarHighlightedNode: any + openContextMenu: any } export const UniOrg = (props: UniOrgProps) => { - const { setSidebarHighlightedNode, nodeById, nodeByCite, previewNode, setPreviewNode } = props + const { + openContextMenu, + setSidebarHighlightedNode, + nodeById, + nodeByCite, + previewNode, + setPreviewNode, + } = props const [previewText, setPreviewText] = useState('') @@ -44,6 +52,7 @@ export const UniOrg = (props: UniOrgProps) => { previewText, nodeByCite, setSidebarHighlightedNode, + openContextMenu, }} /> )} |