@@ -12,6 +12,12 @@ CodeMirror 6 wrapper for Angular
1212[ Documentation] ( https://github.com/acrodata/code-editor?tab=readme-ov-file#code-editor ) |
1313[ Playground] ( https://acrodata.github.io/code-editor/ )
1414
15+ ## Compatibility
16+
17+ | Angular | @acrodata/code-editor |
18+ | ------- | --------------------- |
19+ | >=16 | 0.x |
20+
1521## Installation
1622
1723``` bash
@@ -29,7 +35,9 @@ import { CodeEditor } from '@acrodata/code-editor';
2935
3036@Component ({
3137 selector: ' your-app' ,
32- template: ` <code-editor [(ngModel)]="value" /> ` ,
38+ template: `
39+ <code-editor [(ngModel)]="value" />
40+ ` ,
3341 imports: [FormsModule , CodeEditor ],
3442})
3543export class YourAppComponent {
@@ -78,9 +86,9 @@ export class YourAppComponent {
7886| [ language] | string | ` '' ` | The editor's language. You should set the ` languages ` prop at first. |
7987| [ setup] | Setup | ` 'basic' ` | The editor's built-in setup. The value can be set to [ ` basic ` ] [ _basicSetup ] , [ ` minimal ` ] [ _minimalSetup ] or ` null ` . |
8088| [ extensions] | Extension[ ] | ` [] ` | It will be appended to the root [ extensions] [ _extensions ] . |
81- | (change) | EventEmitter\< string\> | ` - ` | Event emitted when the editor's value changes. |
82- | (focus) | EventEmitter\< void\> | ` - ` | Event emitted when focus on the editor. |
83- | (blur) | EventEmitter\< void\> | ` - ` | Event emitted when the editor has lost focus. |
89+ | (change) | EventEmitter\< string\> | ` - ` | Event emitted when the editor's value changes. |
90+ | (focus) | EventEmitter\< void\> | ` - ` | Event emitted when focus on the editor. |
91+ | (blur) | EventEmitter\< void\> | ` - ` | Event emitted when the editor has lost focus. |
8492
8593### Diff Editor
8694
@@ -99,12 +107,12 @@ export class YourAppComponent {
99107| [ disabled] | boolean | ` false ` | Whether the diff-editor is disabled. |
100108| [ collapseUnchanged] | { margin?: number; minSize?: number } | ` undefined ` | When given, long stretches of unchanged text are collapsed. |
101109| [ diffConfig] | DiffConfig | ` undefined ` | Pass options to the diff algorithm. |
102- | (originalValueChange) | EventEmitter\< string\> | ` - ` | Event emitted when the editor's original value changes. |
103- | (originalFocus) | EventEmitter\< void\> | ` - ` | Event emitted when focus on the original editor. |
104- | (originalBlur) | EventEmitter\< void\> | ` - ` | Event emitted when blur on the original editor. |
105- | (modifiedValueChange) | EventEmitter\< string\> | ` - ` | Event emitted when the editor's modified value changes. |
106- | (modifiedFocus) | EventEmitter\< void\> | ` - ` | Event emitted when focus on the modified editor. |
107- | (modifiedBlur) | EventEmitter\< void\> | ` - ` | Event emitted when blur on the modified editor. |
110+ | (originalValueChange) | EventEmitter\< string\> | ` - ` | Event emitted when the editor's original value changes. |
111+ | (originalFocus) | EventEmitter\< void\> | ` - ` | Event emitted when focus on the original editor. |
112+ | (originalBlur) | EventEmitter\< void\> | ` - ` | Event emitted when blur on the original editor. |
113+ | (modifiedValueChange) | EventEmitter\< string\> | ` - ` | Event emitted when the editor's modified value changes. |
114+ | (modifiedFocus) | EventEmitter\< void\> | ` - ` | Event emitted when focus on the modified editor. |
115+ | (modifiedBlur) | EventEmitter\< void\> | ` - ` | Event emitted when blur on the modified editor. |
108116
109117## License
110118
0 commit comments