ng2-ace-editor
Ace editor integration with typescript for angular 5.
To use Angular 4 install version 0.3.1 (npm i -S ng2-ace-editor@0.3.1).
Install
npm i -S ng2-ace-editor
Load the module for your app:
; @
Use directive
Minimal
//import { AceEditorModule } from 'ng2-ace-editor'; ; @ text:string = "";
Complete
; //to use theme "eclipse"//with angular-cli add "../node_modules/ace-builds/src-min/ace.js" //and "../node_modules/ace-builds/src-min/theme-eclipse.js" to "scripts" var into the file angular-cli.json @ text:string = ""; options:any = maxLines: 1000 printMargin: false; { console; }
Use Component
; //to use theme eclipse//with angular-cli add "../node_modules/ace-builds/src-min/ace.js" //and "../node_modules/ace-builds/src-min/theme-eclipse.js" to "scripts" var into the file angular-cli.json @ @ editor; text: string = ""; { thiseditor; thiseditor; thiseditorcommands }