https://github.com/instance-oom/angular2-ace
angular2 components for ace editor
https://github.com/instance-oom/angular2-ace
Last synced: 9 months ago
JSON representation
angular2 components for ace editor
- Host: GitHub
- URL: https://github.com/instance-oom/angular2-ace
- Owner: instance-oom
- License: mit
- Created: 2016-11-02T03:20:46.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-11-02T07:59:14.000Z (about 9 years ago)
- Last Synced: 2025-03-08T08:17:06.132Z (9 months ago)
- Language: TypeScript
- Size: 48.8 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# angular2-ace
angular2 components for ace editor
# Required
```html
```
# Usage
```typescript
import { LAceEditorModule } from 'angular2-ace';
@NgModule({
imports: [
BrowserModule,
FormsModule,
LAceEditorModule
],
declarations: [
AppComponent
],
bootstrap: [AppComponent]
})
export class AppModule { }
```
## Template
```html
```
## Typescript
```typescript
export class AppComponent {
private aceOption: any;
private mode: string = "text";
private editValue: string = "hello";
constructor() {
}
ngOnInit() {
this.aceOption = {
readonly: false,
theme: 'twilight',
onLoaded: (editor) => {
editor.$blockScrolling = Infinity
editor.setOptions({
minLines: 15,
maxLines: 25
})
},
onChange: (e) => {
}
}
}
}
```
## Options Define
```typescript
export interface IAceEditorOption {
readonly: boolean;
theme: string;
fontSize: number;
tabSize: number;
enableEmmet: boolean;
enableSnippets: boolean;
showPrintMargin: boolean;
onLoaded: Function;
onChange: Function;
}
```