@patternfly/react-code-editor 6.0.0-alpha.83 → 6.0.0-alpha.85
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/README.md +14 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [6.0.0-alpha.85](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@6.0.0-alpha.84...@patternfly/react-code-editor@6.0.0-alpha.85) (2024-07-18)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @patternfly/react-code-editor
|
|
9
|
+
|
|
10
|
+
# [6.0.0-alpha.84](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@6.0.0-alpha.83...@patternfly/react-code-editor@6.0.0-alpha.84) (2024-07-17)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @patternfly/react-code-editor
|
|
13
|
+
|
|
6
14
|
# [6.0.0-alpha.83](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@6.0.0-alpha.82...@patternfly/react-code-editor@6.0.0-alpha.83) (2024-07-15)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @patternfly/react-code-editor
|
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ or
|
|
|
14
14
|
npm install @patternfly/react-code-editor
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
[!NOTE] For TypeScript type definitions, this package uses the `monaco-editor` package as a peer dependency. So, if you need types and don't already have the `monaco-editor package
|
|
17
|
+
[!NOTE] For TypeScript type definitions, this package uses the `monaco-editor` package as a peer dependency. So, if you need types and don't already have the `monaco-editor` package installed, you will need to do so:
|
|
18
18
|
|
|
19
19
|
```sh
|
|
20
20
|
yarn add --dev monaco-editor
|
|
@@ -75,6 +75,19 @@ Next, replace all of the `react-script` references in your `package.json` `scrip
|
|
|
75
75
|
|
|
76
76
|
You can now start your app with `npm start` and syntax highlighting should work.
|
|
77
77
|
|
|
78
|
+
#### To use monaco-editor as an npm package and avoid using CDN
|
|
79
|
+
|
|
80
|
+
The `@monaco-editor/react` package is built on the `monaco-editor` package, which will fetch some additional files using CDN by default. To avoid this, include `monaco-editor` as a dependency and insert the following into your code:
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
import * as monaco from 'monaco-editor';
|
|
84
|
+
import { loader } from '@monaco-editor/react';
|
|
85
|
+
|
|
86
|
+
loader.config({ monaco });
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
This may require the additonal `webpack` plugins such as `monaco-editor-webpack-plugin`. To properly install the library `monaco-editor-webpack-plugin` be sure to follow the [plugin instructions](https://github.com/microsoft/monaco-editor/tree/main/webpack-plugin)
|
|
90
|
+
|
|
78
91
|
#### Enable YAML Syntax Highlighting
|
|
79
92
|
|
|
80
93
|
The Monaco editor doesn't ship with full YAML support. You can configure your code editor with `Languages.yaml` but there will be no highlighting. To enable YAML support you need to do the following:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patternfly/react-code-editor",
|
|
3
|
-
"version": "6.0.0-alpha.
|
|
3
|
+
"version": "6.0.0-alpha.85",
|
|
4
4
|
"description": "This package provides a PatternFly wrapper for the Monaco code editor\n",
|
|
5
5
|
"main": "dist/js/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@monaco-editor/react": "^4.6.0",
|
|
34
|
-
"@patternfly/react-core": "^6.0.0-alpha.
|
|
34
|
+
"@patternfly/react-core": "^6.0.0-alpha.85",
|
|
35
35
|
"@patternfly/react-icons": "^6.0.0-alpha.30",
|
|
36
36
|
"@patternfly/react-styles": "^6.0.0-alpha.29",
|
|
37
37
|
"react-dropzone": "14.2.3",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"monaco-editor": "^0.49.0"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "c3878e74a655cae5c081b3f2b799f060ccd47fed"
|
|
48
48
|
}
|