feat(markdown): add HTML-based table of contents
This commit is contained in:
@@ -75,7 +75,7 @@ function useItems(rightPaneVisible: boolean, widgetsByParent: WidgetsByParent) {
|
||||
const definitions: RightPanelWidgetDefinition[] = [
|
||||
{
|
||||
el: <TableOfContents />,
|
||||
enabled: (noteType === "text" || noteType === "doc" || isPdf),
|
||||
enabled: (noteType === "text" || noteType === "doc" || isPdf || !!note?.isMarkdown()),
|
||||
},
|
||||
{
|
||||
el: <PdfPages />,
|
||||
|
||||
@@ -39,6 +39,7 @@ export default function TableOfContents() {
|
||||
{((noteType === "text" && isReadOnly) || (noteType === "doc")) && <ReadOnlyTextTableOfContents />}
|
||||
{noteType === "text" && !isReadOnly && <EditableTextTableOfContents />}
|
||||
{noteType === "file" && noteMime === "application/pdf" && <PdfTableOfContents />}
|
||||
{note?.isMarkdown() && <ReadOnlyTextTableOfContents />}
|
||||
</RightPanelWidget>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user