i'm using ui-ace, succeed replace selection text following:
$ace_editor.session.replace($ace_editor.selection.getrange(), "hii"); but problem way don't update ng-model, did forget do?
ui-ace not update model need trigger digest loop once update content in editor.
a proper solution use evalasync() or $timeout() wrap $ace_editor.session.replace($ace_editor.selection.getrange(), "hii");.
Comments
Post a Comment