Ace Code Editor Directive for AngularJS
Latest commit 8431952 Oct 10, 2014 @camwest Merge pull request #5 from crysfel/master
FIX: prevent executing the $apply when another is in progress
Failed to load latest commit information.
lib
.gitignore
LICENSE.txt
README.md Update README.md Aug 15, 2012

README.md

angular-ace

A directive for ace code editor

Purpose & Rationale

  • Use ace code editor as if it was a textarea
  • Make sure forms still submit properly with the right data
  • Only submit / bind to scope when the syntax is correct

Installation

Usage

<!doctype html>

<script>
  angular.module('myapp', ['ace']);
</script>

<style type='text/css'>
  /* MUST HAVE WIDTH/HEIGHT */
  .ace-editor {
    width:500px;
    height:500px;
  }

  #contents {
    width:500px;
    height:500px;
    position:absolute;
    left:500px;
    top:0;
  }
</style>

<div ace="json" ng-model="bitchin">
  <textarea name="tutorial[contents]"></textarea>
</div>

<div id="contents">
  Value: {{ bitchin }}
</div>

Copyright

Copyright (c) 2012 Cameron Westland. See LICENSE.txt for further details.