Search code examples
npmbowerace-editorhtml-editorcloud9

Ace HTML Editor - Making resource internal


I've implemented the Ace Editor using the recommended CDN I've seen in their official documentation and it works great.

<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.5/ace.js" type="text/javascript" charset="utf-8"></script>

However, being an external resource, it requires internet, which the user may not always benefit of, as in my case, the application could run on the internal server of an embedded device.

Simply copying the code from the cdn link into a JavaScript plugin starts the editor without any features.

Is there any way to manage this library using bower or npm ?


Solution

  • You need to include mode, theme, and worker files in addition to ace.js, copy the whole https://github.com/ajaxorg/ace-builds/tree/master/src, or use npm install ace-builds