adding web changes of Export HTML (#34117)

GitOrigin-RevId: 804c576faefebfc6683a0363b45372e66a43d8fc
This commit is contained in:
Davinder Singh
2026-06-05 08:06:19 +00:00
committed by Copybot
parent fc2abf5b24
commit 6ce36a2606
10 changed files with 107 additions and 3 deletions
@@ -71,6 +71,20 @@ const ExportDocumentSuccessToast = ({ data }: { data?: any }) => {
]}
/>
)
} else if (type === 'html') {
return (
<Trans
i18nKey="html_export_feedback_message"
components={[
// eslint-disable-next-line react/jsx-key, jsx-a11y/anchor-has-content
<a
href="https://forms.gle/nBUVGqPYwLcWHSmt5"
target="_BLANK"
rel="noopener noreferrer"
/>,
]}
/>
)
} else {
return (
<Trans
@@ -160,7 +174,9 @@ export const hidePreparingExportToast = (handle: string) => {
)
}
export const showExportDocumentSuccess = (type: 'docx' | 'markdown') => {
export const showExportDocumentSuccess = (
type: 'docx' | 'markdown' | 'html'
) => {
window.dispatchEvent(
new CustomEvent('ide:show-toast', {
detail: { key: 'export-document:success', type },
@@ -9,7 +9,7 @@ import { useEditorManagerContext } from '@/features/ide-react/context/editor-man
type ExportProjectWithConversionProps = {
featureFlag?: string
conversionType: 'docx' | 'markdown'
conversionType: 'docx' | 'markdown' | 'html'
label: string
menuBarId: string
}
@@ -96,6 +96,7 @@ export const ToolbarMenuBar = () => {
'download-pdf',
'export-as-docx',
'export-as-markdown',
'export-as-html',
],
},
],
@@ -89,6 +89,12 @@ export const ToolbarProjectTitle = () => {
label={t('export_as_markdown')}
menuBarId="export-as-markdown"
/>
<ExportProjectWithConversionButton
featureFlag="export-html"
conversionType="html"
label={t('export_as_html')}
menuBarId="export-as-html"
/>
<DropdownDivider />
<DuplicateProject />
<OLDropdownMenuItem