mirror of
https://github.com/knadh/listmonk.git
synced 2025-10-07 22:06:23 +08:00
13 lines
478 B
TypeScript
13 lines
478 B
TypeScript
import React, { useMemo } from 'react';
|
|
|
|
import { renderToStaticMarkup } from '@usewaypoint/email-builder';
|
|
|
|
import { useDocument } from '../../documents/editor/EditorContext';
|
|
|
|
import HighlightedCodePanel from './helper/HighlightedCodePanel';
|
|
|
|
export default function HtmlPanel() {
|
|
const document = useDocument();
|
|
const code = useMemo(() => renderToStaticMarkup(document, { rootBlockId: 'root' }), [document]);
|
|
return <HighlightedCodePanel type="html" value={code} />;
|
|
}
|