diff --git a/src/components/ArticleExportMenu/ArticleExportMenu.tsx b/src/components/ArticleExportMenu/ArticleExportMenu.tsx index 78e38ca..f8fc3de 100644 --- a/src/components/ArticleExportMenu/ArticleExportMenu.tsx +++ b/src/components/ArticleExportMenu/ArticleExportMenu.tsx @@ -6,7 +6,6 @@ import { DropdownMenuTrigger, } from '@/components/ui/dropdown-menu' import { MoreVertical, FileDown } from 'lucide-react' -import { contentParserService } from '@/services/content-parser.service' import logger from '@/lib/logger' import { Event } from 'nostr-tools' @@ -16,85 +15,13 @@ interface ArticleExportMenuProps { } export default function ArticleExportMenu({ event, title }: ArticleExportMenuProps) { - const exportArticle = async (format: 'pdf' | 'epub' | 'latex' | 'adoc' | 'html') => { + const exportArticle = async () => { try { const content = event.content - const filename = `${title}.${format}` + const filename = `${title}.adoc` - let blob: Blob = new Blob(['']) - - if (format === 'adoc') { - // Export raw AsciiDoc content - blob = new Blob([content], { type: 'text/plain' }) - } else if (format === 'html') { - // Parse the AsciiDoc content to HTML - const parsedContent = await contentParserService.parseContent(content, { - eventKind: event.kind, - enableMath: true, - enableSyntaxHighlighting: true - }) - - const htmlDocument = ` - -
- -@@ -506,7 +390,7 @@ function ToCItemComponent({