angular-ui / ui-ace

This directive allows you to add ACE editor elements.
http://angular-ui.github.io/ui-ace
MIT License
578 stars 172 forks source link

Added `advanced` and `require` options - fixed double-loading of options. #54

Closed ciel closed 10 years ago

ciel commented 10 years ago

This pull request has 3 major changes.

  1. the issue where settings are loaded twice is fixed.
  2. the ability to support the ace.require function is now implemented, and added to the docs.
  3. the ability to support other options not specifically declared is now available, and added to the docs.

This allows for more configuration, the example I give here is adding autocompletion to the directive without any more javascript code, like this;

<div ui-ace="{
  require: ['ace/ext/language_tools'],
  advanced: {
      enableSnippets: true,
      enableBasicAutocompletion: true,
      enableLiveAutocompletion: true
  }
}"></div>
ciel commented 10 years ago

Sorry for all of the errors. This is my first pull request. I'm going to try again in a few moments once I make some fixes.