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

editorOptions configuration problem #49

Closed
tanjie123 opened this issue Feb 28, 2021 · 1 comment
Closed

editorOptions configuration problem #49

tanjie123 opened this issue Feb 28, 2021 · 1 comment

Comments

@tanjie123
Copy link

Version: "@materia-ui/ngx-monaco-editor": "^5.0.0" 、"monaco-editor": "^0.22.3"

Usage:
<ngx-monaco-editor fxFill #codeEditor [options]="editorOptions" [(ngModel)]="note.content" (init)="editorInit($event)" (keyup)="send()"> </ngx-monaco-editor>
editorOptions = { theme: 'vs-dark', language: 'markdown', minimap: { enabled: false, }, wordWrap: "on", };

Got the problem:

ERROR in src/main/webapp/app/note/note-editor/note-editor.component.html:182:59 - error TS2322: Type '{ theme: string; language: string; minimap: { enabled: boolean; }; wordWrap: string; }' is not assignable to type 'IStandaloneEditorConstructionOptions'.
Types of property 'wordWrap' are incompatible.
Type 'string' is not assignable to type '"on" | "off" | "wordWrapColumn" | "bounded" | undefined'.

182 <ngx-monaco-editor #codeEditor [options]="editorOptions" [(ngModel)]="note.content"

Thank you!!!

@tanjie123
Copy link
Author

When i config as follow, it's ok.
editorOptions: MonacoEditorConstructionOptions = { theme: 'vs-dark', language: 'markdown', minimap: { enabled: false, }, wordWrap: "on", };

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

No branches or pull requests

1 participant