diff --git a/web/app/components/base/markdown/index.tsx b/web/app/components/base/markdown/index.tsx index bab5ac8eba..35862a2556 100644 --- a/web/app/components/base/markdown/index.tsx +++ b/web/app/components/base/markdown/index.tsx @@ -32,6 +32,7 @@ export type MarkdownProps = { content: string className?: string customDisallowedElements?: string[] + rehypePlugins?: any// js: PluggableList[] customComponents?: Record> } @@ -71,6 +72,7 @@ export const Markdown = (props: MarkdownProps) => { tree.children.forEach(iterate) } }, + ...(props.rehypePlugins || []), ]} urlTransform={customUrlTransform} disallowedElements={['iframe', 'head', 'html', 'meta', 'link', 'style', 'body', ...(props.customDisallowedElements || [])]} diff --git a/web/app/components/workflow/nodes/human-input/components/form-content-preview.tsx b/web/app/components/workflow/nodes/human-input/components/form-content-preview.tsx index 10d85b29ef..400fa39a19 100644 --- a/web/app/components/workflow/nodes/human-input/components/form-content-preview.tsx +++ b/web/app/components/workflow/nodes/human-input/components/form-content-preview.tsx @@ -10,6 +10,7 @@ import Badge from '@/app/components/base/badge' import { useTranslation } from 'react-i18next' import ActionButton from '@/app/components/base/action-button' import { RiCloseLine } from '@remixicon/react' +import { Variable, rehypeVariable } from './variable-in-markdown' const i18nPrefix = 'workflow.nodes.humanInput' @@ -38,7 +39,16 @@ const FormContentPreview: FC = ({
- + ( + + ), + }} + />
{userActions.map((action: any) => (