Skip to content

Instantly share code, notes, and snippets.

@jsuwo
Created March 28, 2014 03:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jsuwo/9824800 to your computer and use it in GitHub Desktop.
Save jsuwo/9824800 to your computer and use it in GitHub Desktop.
Rails / Ace Editor integration
//= require jquery
//= require jquery_ujs
//= require turbolinks
//= require_tree .
//= require ace/ace
//= require ace/theme-twilight
//= require ace/mode-java
//= require jquery-ace.min
gem 'jquery-ace-rails'
<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>
@dhurba87
Copy link

dhurba87 commented Jun 6, 2018

How to enable code autocomplete and warning message?

@dhurba87
Copy link

dhurba87 commented Jun 6, 2018

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