diff --git a/lerna.json b/lerna.json index 95e098d1f6..7001a85e01 100644 --- a/lerna.json +++ b/lerna.json @@ -2,9 +2,7 @@ "version": "1.3.0-alpha", "npmClient": "yarn", "useWorkspaces": true, - "npmClientArgs": [ - "--ignore-engines" - ], + "npmClientArgs": ["--ignore-engines"], "command": { "version": { "forcePublish": true, diff --git a/packages/core/client/src/locale/zh-CN.json b/packages/core/client/src/locale/zh-CN.json index d7b531ff68..842a06fbe3 100644 --- a/packages/core/client/src/locale/zh-CN.json +++ b/packages/core/client/src/locale/zh-CN.json @@ -966,5 +966,6 @@ "Search": "搜索", "Clear default value": "清除默认值", "Open in new window": "新窗口打开", - "Sorry, the page you visited does not exist.": "抱歉,你访问的页面不存在。" + "Sorry, the page you visited does not exist.": "抱歉,你访问的页面不存在。", + "Set Template Engine": "设置模板引擎" } diff --git a/packages/core/client/src/modules/blocks/other-blocks/markdown/MarkdownBlockInitializer.tsx b/packages/core/client/src/modules/blocks/other-blocks/markdown/MarkdownBlockInitializer.tsx index a822937f4d..60653cb802 100644 --- a/packages/core/client/src/modules/blocks/other-blocks/markdown/MarkdownBlockInitializer.tsx +++ b/packages/core/client/src/modules/blocks/other-blocks/markdown/MarkdownBlockInitializer.tsx @@ -29,6 +29,7 @@ export const MarkdownBlockInitializer = () => { 'x-decorator': 'CardItem', 'x-decorator-props': { name: 'markdown', + engine: 'handlebars', }, 'x-component': 'Markdown.Void', 'x-editable': false, diff --git a/packages/core/client/src/modules/blocks/other-blocks/markdown/markdownBlockSettings.ts b/packages/core/client/src/modules/blocks/other-blocks/markdown/markdownBlockSettings.ts index c310745eff..dd49f15815 100644 --- a/packages/core/client/src/modules/blocks/other-blocks/markdown/markdownBlockSettings.ts +++ b/packages/core/client/src/modules/blocks/other-blocks/markdown/markdownBlockSettings.ts @@ -11,7 +11,7 @@ import { useField } from '@formily/react'; import { useTranslation } from 'react-i18next'; import { SchemaSettings } from '../../../../application/schema-settings/SchemaSettings'; import { SchemaSettingsBlockHeightItem } from '../../../../schema-settings/SchemaSettingsBlockHeightItem'; - +import { SchemaSettingsRenderEngine } from '../../../../schema-settings/SchemaSettingsRenderEngine'; export const markdownBlockSettings = new SchemaSettings({ name: 'blockSettings:markdown', items: [ @@ -30,6 +30,10 @@ export const markdownBlockSettings = new SchemaSettings({ }; }, }, + { + name: 'setBlockTemplate', + Component: SchemaSettingsRenderEngine, + }, { name: 'setTheBlockHeight', Component: SchemaSettingsBlockHeightItem, diff --git a/packages/core/client/src/schema-component/antd/markdown/Markdown.Void.Designer.tsx b/packages/core/client/src/schema-component/antd/markdown/Markdown.Void.Designer.tsx index f797f2fff7..2e34e397e8 100644 --- a/packages/core/client/src/schema-component/antd/markdown/Markdown.Void.Designer.tsx +++ b/packages/core/client/src/schema-component/antd/markdown/Markdown.Void.Designer.tsx @@ -15,6 +15,7 @@ import { SchemaSettingsDivider, SchemaSettingsItem, SchemaSettingsRemove, + SchemaSettingsRenderEngine, } from '../../../schema-settings'; import { SchemaSettingsBlockHeightItem } from '../../../schema-settings/SchemaSettingsBlockHeightItem'; @@ -29,6 +30,7 @@ export const MarkdownVoidDesigner = () => { field.editable = true; }} /> + { scope: any[]; defaultValue?: string; @@ -82,11 +84,19 @@ const MarkdownEditor = (props: MarkdownEditorProps) => { }} style={{ paddingBottom: '40px' }} /> + <> + + {t('Syntax references')}: + + + Handlebars.js + +
- +