diff --git a/packages/amis/src/renderers/Form/Editor.tsx b/packages/amis/src/renderers/Form/Editor.tsx index 6afdf4d52..b5e309539 100644 --- a/packages/amis/src/renderers/Form/Editor.tsx +++ b/packages/amis/src/renderers/Form/Editor.tsx @@ -247,7 +247,7 @@ export default class EditorControl extends React.Component { if (this.props.editorDidMount) { let editorDidMount = this.props.editorDidMount; if (typeof editorDidMount === 'string') { - editorDidMount = new Function('editor', 'monaco'); + editorDidMount = new Function('editor', 'monaco', editorDidMount); } const dispose = editorDidMount(editor, monaco); if (typeof dispose === 'function') {