An open API service indexing awesome lists of open source software.

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

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;
}
```