diff --git a/packages/core/client/src/schema-component/antd/markdown/Markdown.Void.tsx b/packages/core/client/src/schema-component/antd/markdown/Markdown.Void.tsx index 93f4ee1009..eb9a7e5055 100644 --- a/packages/core/client/src/schema-component/antd/markdown/Markdown.Void.tsx +++ b/packages/core/client/src/schema-component/antd/markdown/Markdown.Void.tsx @@ -9,25 +9,25 @@ import { observer, useField, useFieldSchema } from '@formily/react'; import { Input as AntdInput, Button, Space, Spin, theme } from 'antd'; +import { TextAreaProps } from 'antd/es/input'; import type { TextAreaRef } from 'antd/es/input/TextArea'; import cls from 'classnames'; -import React, { useCallback, useEffect, useState, useRef } from 'react'; +import React, { useCallback, useEffect, useRef, useState } from 'react'; import { useTranslation } from 'react-i18next'; -import { useGlobalTheme } from '../../../global-theme'; -import { useDesignable } from '../../hooks/useDesignable'; -import { MarkdownVoidDesigner } from './Markdown.Void.Designer'; -import { useStyles } from './style'; -import { TextAreaProps } from 'antd/es/input'; -import { useBlockHeight } from '../../hooks/useBlockSize'; -import { withDynamicSchemaProps } from '../../../hoc/withDynamicSchemaProps'; -import { useCollectionRecord } from '../../../data-source'; -import { useVariableOptions } from '../../../schema-settings/VariableInput/hooks/useVariableOptions'; -import { VariableSelect } from '../variable/VariableSelect'; -import { useLocalVariables, useVariables } from '../../../variables'; -import { registerQrcodeWebComponent } from './qrcode-webcom'; -import { getRenderContent } from '../../common/utils/uitls'; -import { parseMarkdown } from './util'; import { useCompile } from '../../'; +import { useCollectionRecord } from '../../../data-source'; +import { useGlobalTheme } from '../../../global-theme'; +import { withDynamicSchemaProps } from '../../../hoc/withDynamicSchemaProps'; +import { useVariableOptions } from '../../../schema-settings/VariableInput/hooks/useVariableOptions'; +import { useLocalVariables, useVariables } from '../../../variables'; +import { getRenderContent } from '../../common/utils/uitls'; +import { useBlockHeight } from '../../hooks/useBlockSize'; +import { useDesignable } from '../../hooks/useDesignable'; +import { VariableSelect } from '../variable/VariableSelect'; +import { MarkdownVoidDesigner } from './Markdown.Void.Designer'; +import { registerQrcodeWebComponent } from './qrcode-webcom'; +import { useStyles } from './style'; +import { parseMarkdown } from './util'; export interface MarkdownEditorProps extends Omit { scope: any[]; defaultValue?: string; @@ -37,7 +37,7 @@ export interface MarkdownEditorProps extends Omit { const MarkdownEditor = (props: MarkdownEditorProps) => { const { scope } = props; - const { t } = useTranslation(); + const { t, i18n } = useTranslation(); const [value, setValue] = useState(props.defaultValue); const inputRef = useRef(null); const [options, setOptions] = useState([]); @@ -87,7 +87,12 @@ const MarkdownEditor = (props: MarkdownEditorProps) => { {t('Syntax references')}: - + + Handlebars.js diff --git a/packages/plugins/@nocobase/plugin-block-iframe/src/client/schemaSettings.tsx b/packages/plugins/@nocobase/plugin-block-iframe/src/client/schemaSettings.tsx index ee695c3ac4..1124cba449 100644 --- a/packages/plugins/@nocobase/plugin-block-iframe/src/client/schemaSettings.tsx +++ b/packages/plugins/@nocobase/plugin-block-iframe/src/client/schemaSettings.tsx @@ -47,7 +47,7 @@ const commonOptions: any = { useComponentProps() { const field = useField(); const fieldSchema = useFieldSchema(); - const { t } = useTranslation(); + const { t, i18n } = useTranslation(); const { dn } = useDesignable(); const api = useAPIClient(); const { mode, url, params, htmlId, height = '60vh', engine } = fieldSchema['x-component-props'] || {}; @@ -92,8 +92,14 @@ const commonOptions: any = { <> {t('Syntax references')}: - - + {' '} + Handlebars.js