Witty with Ace and CodeMirror

Our product requires an online code editor. So, we decided to experiment with two of the leading contenders – Ace and CodeMirror. Both of these are open sourced and can be easily integrated with Witty. In fact, we managed the integration is about an hour each.

I’ll skip the details on how to use Ace and CodeMirror as these can be gleaned from their friendly documentation. They’re also both compatible in so many ways.

However, I will try to show how it can be easily integrated with Witty and also some general comments. All we need is to load the Javascript, invoke the appropriate functions with the appropriate DOM object to use as the editor, and set the onChange event trigger.