Parcourir la source

CSS Ace Editor

Guillermo Espinoza il y a 8 ans
Parent
commit
32f04aab4e
1 fichiers modifiés avec 6 ajouts et 7 suppressions
  1. 6 7
      Resources/views/Action/action_edit.html.twig

+ 6 - 7
Resources/views/Action/action_edit.html.twig

@@ -2,34 +2,33 @@
 
 {% block form %}
     {{ parent() }}
-     
+
     {#https://github.com/ryanburnette/textarea-as-ace-editor#}
     {#https://ace.c9.io/#}
     {#https://ace.c9.io/build/kitchen-sink.html#}
     <script src="{{ asset('bundles/baseadmin') }}/ace_editor/src-noconflict/ace.js" type="text/javascript" charset="utf-8"></script>
     <script src="{{ asset('bundles/baseadmin') }}/ace_editor/textarea-as-ace-editor.js" type="text/javascript" charset="utf-8"></script>
-     
+
     <style type="text/css" media="screen">
         .ace_editor {
             height: 250px!important;
+            border: 1px solid #CCCCCC;
         }
     </style>
 
     <script type="text/javascript">
-        $( document ).ready(function() {
+        $(document).ready(function () {
             $("textarea").asAceEditor();
             editor = $('textarea').data('ace-editor');
-            
+
             editor.setTheme("ace/theme/github");
             editor.getSession().setMode("ace/mode/twig");
-            //editor.setReadOnly(true);
             editor.setFontSize(14);
             editor.setShowInvisibles(true);
             editor.getSession().setTabSize(2);
             editor.getSession().setUseSoftTabs(true);
             editor.getSession().setUseWrapMode(true);
+            editor.setShowPrintMargin(false);
         });
     </script>
-
-
 {% endblock %}