K_U K_U - 1 year ago 76
Javascript Question

How to get Range when using angular ui ace?

Does anyone know how i can get Range with angular ui ace?
If i am directly embedding ace in my html, i could probably do something like this:

var editor = ace.edit("editor");

var Range = ace.require('ace/range').Range;

But how can i get this with angular ui ace? I have access to the model and the Editor class, but i guess this will require the ace object?

Ace documentation

angular ui ace


Answer Source

ace global variable is available with angular ui ace too. Try ace.require('ace/range').Range; in the console on ui-ace demo page http://angular-ui.github.io/ui-ace/

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download