Skip to content

Commit 74bce1d

Browse files
committed
Bumped version 6.0.0 -> 7.0.0
1 parent a64309d commit 74bce1d

File tree

4 files changed

+22
-5567
lines changed

4 files changed

+22
-5567
lines changed

README.md

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
- Angular <= 4: v3.x.x
44
- Angular 5: v5.x.x
55
- Angular 6: v6.x.x
6+
- Angular 7: v7.x.x
67

78
Using this Module you can utilize the Monaco Editor as an Angular Component. Feel free to contribute, raise feature requests and make it better.
89

@@ -17,9 +18,9 @@ Install from npm repository:
1718
npm install ngx-monaco-editor --save
1819
```
1920

20-
For angular version 5 use v5.x.x
21+
For angular version 6 use v6.x.x
2122
```
22-
npm install ngx-monaco-editor@5.0.0 --save
23+
npm install ngx-monaco-editor@6.0.0 --save
2324
```
2425

2526
Add the glob to assets in .angular-cli.json (to make monaco-editor lib available to the app):
@@ -185,32 +186,35 @@ import { MonacoEditorModule, NgxMonacoEditorConfig } from 'ngx-monaco-editor';
185186
import { AppComponent } from './app.component';
186187

187188
const monacoConfig: NgxMonacoEditorConfig = {
188-
onMonacoLoad: () => {
189-
const id = "foo.json";
189+
baseUrl: 'assets',
190+
defaultOptions: { scrollBeyondLastLine: false },
191+
onMonacoLoad: () => {
192+
console.log((window as any).monaco);
193+
const uri = monaco.Uri.parse('a://b/foo.json');
190194
monaco.languages.json.jsonDefaults.setDiagnosticsOptions({
191195
validate: true,
192196
schemas: [{
193-
uri: "http://myserver/foo-schema.json",
194-
fileMatch: [id],
197+
uri: 'http://myserver/foo-schema.json',
198+
fileMatch: [uri.toString()],
195199
schema: {
196-
type: "object",
200+
type: 'object',
197201
properties: {
198202
p1: {
199-
enum: [ "v1", "v2"]
203+
enum: ['v1', 'v2']
200204
},
201205
p2: {
202-
$ref: "http://myserver/bar-schema.json"
206+
$ref: 'http://myserver/bar-schema.json'
203207
}
204208
}
205209
}
206-
},{
207-
uri: "http://myserver/bar-schema.json",
208-
fileMatch: [id],
210+
}, {
211+
uri: 'http://myserver/bar-schema.json',
212+
fileMatch: [uri.toString()],
209213
schema: {
210-
type: "object",
214+
type: 'object',
211215
properties: {
212216
q1: {
213-
enum: [ "x1", "x2"]
217+
enum: ['x1', 'x2']
214218
}
215219
}
216220
}
@@ -257,7 +261,7 @@ export class AppComponent {
257261
model: NgxEditorModel = {
258262
value: this.jsonCode,
259263
language: 'json',
260-
uri: 'foo.json'
264+
uri: monaco.Uri.parse('a://b/foo.json')
261265
};
262266
}
263267
```

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngx-monaco-editor",
3-
"version": "2.0.1",
3+
"version": "7.0.0",
44
"description": "Monaco Code Editor For Angular",
55
"keywords": [
66
"angular",
@@ -18,7 +18,7 @@
1818
"lint": "ng lint",
1919
"e2e": "ng e2e",
2020
"build-editor": "npm run copy:readme && npm run copy:typings && ng build editor && npm run copy:types && npm run copy:editor",
21-
"npm-publish": "npm run build && bash scripts/npm-publish",
21+
"npm-publish": "npm run build-editor && bash scripts/npm-publish",
2222
"copy:typings": "cp node_modules/monaco-editor/monaco.d.ts projects/editor/src/lib",
2323
"copy:types": "cp node_modules/monaco-editor/monaco.d.ts dist/editor",
2424
"copy:readme": "cp -rf README.md projects/editor/",

projects/editor/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngx-monaco-editor",
3-
"version": "6.0.0",
3+
"version": "7.0.0",
44
"private": false,
55
"description": "Monaco Code Editor for Angular",
66
"keywords": [

0 commit comments

Comments
 (0)