Advertisement
mstranieri

Ace Editor

Nov 23rd, 2015
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     <script>
  2.         var editor = ace.edit("editor");
  3.  
  4.         //qui sotto l'errore "Unexpected token ILLEGAL"
  5.         var content = "<#if theme?? && theme.css??>${theme.css?trim?replace('\n', '\\u000A')!}</#if>";
  6.        
  7.         editor.setTheme("ace/theme/twilight");
  8.         session = editor.session;
  9.         session.setNewLineMode("unix");
  10.         JSON.stringify(session.doc.getNewLineCharacter());
  11.         session.doc.getValue().indexOf("\n") == -1;
  12.         editor.getSession().setMode("ace/mode/css");
  13.         editor.setValue(content);
  14.     </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement