Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(module:code-editor): add global configuration to support monaco require config #7121

Merged
merged 1 commit into from Apr 21, 2022

Conversation

kainonly
Copy link
Contributor

  • add global configuration codeEditor.extraConfig to support monaco require config

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Application (the showcase website) / infrastructure changes
[ ] Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

monaco required configuration, for example

const ngZorroConfig: NzConfig = {
  codeEditor: {
    assetsRoot: `https://cdn.jsdelivr.net/npm/monaco-editor@latest/min`,
    extraConfig: {
      'vs/nls': { availableLanguages: { '*': 'zh-cn' } }
    }
  }
};

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

@zorro-bot
Copy link

zorro-bot bot commented Dec 16, 2021

This preview will be available after the AzureCI is passed.

@codecov
Copy link

codecov bot commented Dec 16, 2021

Codecov Report

Merging #7121 (e32884b) into master (e998e4a) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #7121   +/-   ##
=======================================
  Coverage   89.61%   89.61%           
=======================================
  Files         488      488           
  Lines       15893    15893           
  Branches     2582     2582           
=======================================
  Hits        14242    14242           
  Misses       1017     1017           
  Partials      634      634           
Impacted Files Coverage Δ
components/code-editor/code-editor.service.ts 18.98% <ø> (ø)
components/core/config/config.ts 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e998e4a...e32884b. Read the comment docs.

@simplejason
Copy link
Member

@hsuanxyz Can you check this PR?

Copy link
Member

@simplejason simplejason left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants