diff options
author | Thomas F. K. Jorna <[email protected]> | 2021-11-13 01:32:10 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-11-13 01:32:10 +0100 |
commit | 5b6eb504587df592e42690743bce4b41d4066d00 (patch) | |
tree | f894e6997c9e0398d1ce13bb56e1964dcf129752 /components/Sidebar/Note.tsx | |
parent | e214bc388e545cf695e97a3a2e714d5dbb5f25c1 (diff) |
Feat: Markdown file previewing (#152)
* feat(md): initial support for md-roam
* feat(md): link support and more for md
* fix(md): add missing remark math package
Diffstat (limited to 'components/Sidebar/Note.tsx')
-rw-r--r-- | components/Sidebar/Note.tsx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/components/Sidebar/Note.tsx b/components/Sidebar/Note.tsx index 197fa76..62cc8ad 100644 --- a/components/Sidebar/Note.tsx +++ b/components/Sidebar/Note.tsx @@ -1,11 +1,12 @@ import React from 'react' import { NodeObject } from 'force-graph' -import { NodeById, NodeByCite, LinksByNodeId } from '../../pages' +import { NodeById, NodeByCite, LinksByNodeId, normalizeLinkEnds } from '../../pages' import { Box, Flex } from '@chakra-ui/react' import { UniOrg } from '../../util/uniorg' import { Backlinks } from '../../components/Sidebar/Backlinks' import { defaultNoteStyle, viewerNoteStyle, outlineNoteStyle } from './noteStyle' +import { OrgRoamLink } from '../../api' export interface NoteProps { setPreviewNode: any @@ -35,6 +36,7 @@ export const Note = (props: NoteProps) => { outline, collapse, } = props + const extraStyle = outline ? outlineNoteStyle : viewerNoteStyle return ( <Box @@ -59,12 +61,13 @@ export const Note = (props: NoteProps) => { {...{ setPreviewNode, previewNode, - nodeById, nodeByCite, setSidebarHighlightedNode, openContextMenu, outline, collapse, + nodeById, + linksByNodeId, }} /> <Backlinks |