Open kaikreuzer opened 8 years ago
This library will not work in our case. It does the normal syntax highlighting in elements like divs. A textarea does not allow text formatting as such, so to implement this we need to explore some other available editor options.
I often use this powerfull and fast embeddable code editor: https://ace.c9.io/ A full featured example with 110 languages: https://ace.c9.io/build/kitchen-sink.html
@aounhaider1, @kaikreuzer, we could write highlighters for OH specific Syntax like things, channels, items, sitemaps and xText Rules etc. too.
Don't know if this BSD-license does conflict with OH2-license in front-end https://github.com/ajaxorg/ace/blob/master/LICENSE
BSD is compatible with EPL, so this should be no issue.
It would be nice to have syntax highlighting for Javascript in the text area of the script module.
It seems that such stuff exists for angular, see http://ngmodules.org/modules/angular-highlightjs.