summaryrefslogtreecommitdiff
path: root/components/contextmenu.tsx
diff options
context:
space:
mode:
authorThomas F. K. Jorna <[email protected]>2021-09-27 13:36:58 +0200
committerThomas F. K. Jorna <[email protected]>2021-09-27 13:36:58 +0200
commitec6f3e51bb7f33594c7d0151fc3bf1f09db4115a (patch)
treeaf8925f3a75c6b5454ac5005a4263c2446e0d351 /components/contextmenu.tsx
parentcb29db132f79f9d35b323ae12524137cf5985018 (diff)
feat: get org text from emacs
Diffstat (limited to 'components/contextmenu.tsx')
-rw-r--r--components/contextmenu.tsx3
1 files changed, 3 insertions, 0 deletions
diff --git a/components/contextmenu.tsx b/components/contextmenu.tsx
index 755bd9d..39b1895 100644
--- a/components/contextmenu.tsx
+++ b/components/contextmenu.tsx
@@ -55,6 +55,7 @@ export default interface ContextMenuProps {
scope: { nodeIds: string[] }
deleteNodeInEmacs: (node: OrgRoamNode) => void
createNodeInEmacs: (node: OrgRoamNode) => void
+ getOrgText: any
}
export const ContextMenu = (props: ContextMenuProps) => {
@@ -69,6 +70,7 @@ export const ContextMenu = (props: ContextMenuProps) => {
openNodeInEmacs,
deleteNodeInEmacs,
createNodeInEmacs,
+ getOrgText,
} = props
const { isOpen, onOpen, onClose } = useDisclosure()
const copyRef = useRef<any>()
@@ -157,6 +159,7 @@ export const ContextMenu = (props: ContextMenuProps) => {
Permenantly delete note
</MenuItem>
)}
+ <MenuItem onClick={() => getOrgText(node)}>Preview</MenuItem>
</MenuList>
</Menu>
</Box>