mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +01:00
adding web changes of Export HTML (#34117)
GitOrigin-RevId: 804c576faefebfc6683a0363b45372e66a43d8fc
This commit is contained in:
+17
-1
@@ -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 },
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user