Created
March 28, 2014 03:38
-
-
Save jsuwo/9824800 to your computer and use it in GitHub Desktop.
Rails / Ace Editor integration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//= require jquery | |
//= require jquery_ujs | |
//= require turbolinks | |
//= require_tree . | |
//= require ace/ace | |
//= require ace/theme-twilight | |
//= require ace/mode-java | |
//= require jquery-ace.min |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem 'jquery-ace-rails' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<textarea id="editor" rows="30" style="width: 100%"> | |
public class Test { | |
public static void main(String[] args) throws Exception { | |
System.out.println("Hello world!"); | |
} | |
} | |
</textarea> | |
<script> | |
$('#editor').ace({ theme: 'twilight', lang: 'java' }) | |
</script> |
Also theme-textmate is not loading properly
ace.self-65bf62b01961ec59268304e974a57d9c575367012b6427c0698087a33c0102c8.js?body=1:1 GET http://localhost:3000/admin/affiliate_partners/theme-textmate.js 404 (Not Found)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How to enable code autocomplete and warning message?