From a4114da8a7034c05086ead16f801d2933bf14071 Mon Sep 17 00:00:00 2001 From: Braulio Diez Botella Date: Mon, 21 Aug 2023 08:35:22 +0200 Subject: [PATCH 01/21] html button --- .../template-export.component.tsx | 16 +++++++++++++++- .../template-export.container.tsx | 13 ++++++++++++- package-lock.json | 2 +- 3 files changed, 28 insertions(+), 3 deletions(-) diff --git a/apps/react-app/src/pods/template-export/template-export.component.tsx b/apps/react-app/src/pods/template-export/template-export.component.tsx index 6dc164c2..5889f247 100644 --- a/apps/react-app/src/pods/template-export/template-export.component.tsx +++ b/apps/react-app/src/pods/template-export/template-export.component.tsx @@ -6,10 +6,11 @@ import * as classes from './template-export.styles'; interface Props { onExportToWord: (text: string) => void; onExportToMarkdown: (text: string) => void; + onExportToHTML: (text: string) => void; } export const TemplateExport: React.FC = props => { - const { onExportToWord, onExportToMarkdown } = props; + const { onExportToWord, onExportToMarkdown, onExportToHTML } = props; const { userChoice, setUserChoice } = useUserChoiceContext(); const [text, setText] = React.useState(''); @@ -27,6 +28,11 @@ export const TemplateExport: React.FC = props => { onExportToMarkdown(text); }; + const handleExportToHTML = () => { + setUserChoice({ ...userChoice, manfredJsonContent: text }); + onExportToHTML(text); + }; + return (
@@ -55,6 +61,14 @@ export const TemplateExport: React.FC = props => { > Export To Markdown +