Skip to content

Commit 3edfbd3

Browse files
authored
Upgrade monaco editor version to 0.52.2 (#30)
* feat: upgrade monaco-editor's version to v0.52.2 --------- Co-authored-by: zhaoge <>
1 parent e090623 commit 3edfbd3

File tree

5 files changed

+138
-15
lines changed

5 files changed

+138
-15
lines changed

CHANGELOG.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,90 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
## [2.0.0-beta.20](https://github.com/DTStack/dt-react-monaco-editor/compare/v2.0.0-beta.19...v2.0.0-beta.20) (2025-09-25)
6+
7+
8+
### Features
9+
10+
* upgrade monaco-editor's version ([6eab9cd](https://github.com/DTStack/dt-react-monaco-editor/commit/6eab9cd4999d725e1976b88bf207e4f24b251eda))
11+
12+
## [2.0.0-beta.19](https://github.com/DTStack/dt-react-monaco-editor/compare/v2.0.0-beta.18...v2.0.0-beta.19) (2025-09-25)
13+
14+
## [2.0.0-beta.18](https://github.com/DTStack/dt-react-monaco-editor/compare/v2.0.0-beta.17...v2.0.0-beta.18) (2025-09-24)
15+
16+
## [2.0.0-beta.17](https://github.com/DTStack/dt-react-monaco-editor/compare/v2.0.0-beta.16...v2.0.0-beta.17) (2025-09-24)
17+
18+
## [2.0.0-beta.16](https://github.com/DTStack/dt-react-monaco-editor/compare/v2.0.0-beta.15...v2.0.0-beta.16) (2025-09-24)
19+
20+
## [2.0.0-beta.15](https://github.com/DTStack/dt-react-monaco-editor/compare/v2.0.0-beta.14...v2.0.0-beta.15) (2025-09-24)
21+
22+
## [2.0.0-beta.14](https://github.com/DTStack/dt-react-monaco-editor/compare/v2.0.0-beta.13...v2.0.0-beta.14) (2025-09-24)
23+
24+
## [2.0.0-beta.13](https://github.com/DTStack/dt-react-monaco-editor/compare/v2.0.0-beta.12...v2.0.0-beta.13) (2025-09-24)
25+
26+
## [2.0.0-beta.12](https://github.com/DTStack/dt-react-monaco-editor/compare/v2.0.0-beta.11...v2.0.0-beta.12) (2025-09-24)
27+
28+
## [2.0.0-beta.11](https://github.com/DTStack/dt-react-monaco-editor/compare/v2.0.0-beta.10...v2.0.0-beta.11) (2025-09-23)
29+
30+
## [2.0.0-beta.10](https://github.com/DTStack/dt-react-monaco-editor/compare/v2.0.0-beta.9...v2.0.0-beta.10) (2025-09-23)
31+
32+
## [2.0.0-beta.9](https://github.com/DTStack/dt-react-monaco-editor/compare/v2.0.0-beta.8...v2.0.0-beta.9) (2025-09-23)
33+
34+
## [2.0.0-beta.8](https://github.com/DTStack/dt-react-monaco-editor/compare/v2.0.0-beta.7...v2.0.0-beta.8) (2025-09-23)
35+
36+
## [2.0.0-beta.7](https://github.com/DTStack/dt-react-monaco-editor/compare/v2.0.0-beta.6...v2.0.0-beta.7) (2025-09-18)
37+
38+
## [2.0.0-beta.6](https://github.com/DTStack/dt-react-monaco-editor/compare/v2.0.0-beta.5...v2.0.0-beta.6) (2025-09-18)
39+
40+
## [2.0.0-beta.5](https://github.com/DTStack/dt-react-monaco-editor/compare/v2.0.0-beta.0...v2.0.0-beta.5) (2025-09-18)
41+
42+
43+
### Features
44+
45+
* optimize ([4a13ddc](https://github.com/DTStack/dt-react-monaco-editor/commit/4a13ddc26816c9adede8231de6067219cfb0b57d))
46+
47+
## [2.0.0-beta.4](https://github.com/DTStack/dt-react-monaco-editor/compare/v2.0.0-beta.0...v2.0.0-beta.4) (2025-09-18)
48+
49+
50+
### Features
51+
52+
* optimize ([4a13ddc](https://github.com/DTStack/dt-react-monaco-editor/commit/4a13ddc26816c9adede8231de6067219cfb0b57d))
53+
54+
## [2.0.0-beta.3](https://github.com/DTStack/dt-react-monaco-editor/compare/v2.0.0-beta.0...v2.0.0-beta.3) (2025-09-18)
55+
56+
57+
### Features
58+
59+
* optimize ([4a13ddc](https://github.com/DTStack/dt-react-monaco-editor/commit/4a13ddc26816c9adede8231de6067219cfb0b57d))
60+
61+
## [2.0.0-beta.2](https://github.com/DTStack/dt-react-monaco-editor/compare/v2.0.0-beta.0...v2.0.0-beta.2) (2025-09-18)
62+
63+
64+
### Features
65+
66+
* optimize ([4a13ddc](https://github.com/DTStack/dt-react-monaco-editor/commit/4a13ddc26816c9adede8231de6067219cfb0b57d))
67+
68+
## [2.0.0-beta.2](https://github.com/DTStack/dt-react-monaco-editor/compare/v2.0.0-beta.0...v2.0.0-beta.2) (2025-09-18)
69+
70+
71+
### Features
72+
73+
* optimize ([4a13ddc](https://github.com/DTStack/dt-react-monaco-editor/commit/4a13ddc26816c9adede8231de6067219cfb0b57d))
74+
75+
## [2.0.0-beta.1](https://github.com/DTStack/dt-react-monaco-editor/compare/v2.0.0-beta.0...v2.0.0-beta.1) (2025-09-18)
76+
77+
78+
### Features
79+
80+
* optimize ([4a13ddc](https://github.com/DTStack/dt-react-monaco-editor/commit/4a13ddc26816c9adede8231de6067219cfb0b57d))
81+
82+
## [2.0.0-beta.0](https://github.com/DTStack/dt-react-monaco-editor/compare/v1.0.4...v2.0.0-beta.0) (2025-09-17)
83+
84+
85+
### Features
86+
87+
* **upgrade monaco-editor's version to 0.52.2:** upgrade ([a3b74fb](https://github.com/DTStack/dt-react-monaco-editor/commit/a3b74fb61fdb9cb96eec77967ee84e981663abc5))
88+
589
### [1.0.4](https://github.com/DTStack/dt-react-monaco-editor/compare/v1.0.3...v1.0.4) (2024-04-17)
690

791

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dt-react-monaco-editor",
3-
"version": "1.0.4",
3+
"version": "2.0.0-beta.20",
44
"description": "Monaco editor for React.",
55
"authors": "DTStack Corporation",
66
"keywords": [
@@ -40,15 +40,15 @@
4040
"husky": "^8.0.3",
4141
"inquirer": "^8.2.2",
4242
"lint-staged": "^10.0.7",
43-
"monaco-editor": "0.31.1",
43+
"monaco-editor": "0.52.2",
4444
"prettier": "^2.2.0",
45-
"react": "18.x",
45+
"react": "16.13.x",
4646
"standard-version": "^7.0.1",
4747
"tslib": "^2.5.0",
4848
"typescript": "^5.0.4"
4949
},
5050
"peerDependencies": {
51-
"monaco-editor": "^0.31.0",
51+
"monaco-editor": "^0.52.2",
5252
"react": ">=16.13.1"
5353
},
5454
"license": "MIT",

pnpm-lock.yaml

Lines changed: 41 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/config.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,11 @@ export const defaultOptions: monaco.editor.IStandaloneEditorConstructionOptions
1313
fontSize: 13,
1414
fixedOverflowWidgets: true,
1515
renderControlCharacters: true,
16+
dragAndDrop: false,
17+
dropIntoEditor: {
18+
enabled: false,
19+
},
20+
inlineSuggest: {
21+
enabled: true,
22+
},
1623
};

src/editor.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import * as React from 'react';
2+
23
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api';
34

45
import { defaultOptions } from './config';
@@ -80,7 +81,7 @@ class MonacoEditor extends React.Component<MonacoEditorProps> {
8081
...defaultOptions,
8182
...options,
8283
value,
83-
language: language || 'sql',
84+
language: language || 'plaintext',
8485
theme,
8586
};
8687
this.editor = monaco.editor.create(

0 commit comments

Comments
 (0)