nie-ine / inseri

inseri serves as an online collaborative work and publish environment.
https://nie-ine.github.io/inseri
Other
13 stars 4 forks source link

json environment: syntax highlighting #564

Closed cyrill-martin closed 4 years ago

cyrill-martin commented 4 years ago

To set the correct syntax highlighting for the ace editor in angular you have to import the according module:

E.g.

import 'ace-builds/src-noconflict/mode-python';

Then you can do something like this:

HTML: <ace-editor #editor>

TS:

@ViewChild('editor') editor;
this.editor.setMode('python') 

Or directly in the HTML: <ace-editor [mode]="'python'">

janCstoffregen commented 4 years ago

amazing!

janCstoffregen commented 4 years ago

done