Skip to content

Commit

Permalink
feat(module:code-editor): add global configuration to support monaco …
Browse files Browse the repository at this point in the history
…require config (#7121)
  • Loading branch information
kainonly committed Apr 21, 2022
1 parent 4c669a5 commit 21ec517
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/code-editor/code-editor.service.ts
Expand Up @@ -127,7 +127,8 @@ export class NzCodeEditorService implements OnDestroy {
const onLoad = (): void => {
cleanup();
windowAsAny.require.config({
paths: { vs }
paths: { vs },
...this.config.extraConfig
});
windowAsAny.require(['vs/editor/editor.main'], () => {
this.onLoad();
Expand Down
1 change: 1 addition & 0 deletions components/core/config/config.ts
Expand Up @@ -110,6 +110,7 @@ export interface ButtonConfig {

export interface CodeEditorConfig {
assetsRoot?: string | SafeUrl;
extraConfig?: NzSafeAny;
defaultEditorOption?: NzSafeAny;
useStaticLoading?: boolean;
monacoEnvironment?: Environment;
Expand Down

0 comments on commit 21ec517

Please sign in to comment.