diff --git a/app/assets/javascripts/cmtool/html_edit.js.coffee b/app/assets/javascripts/cmtool/html_edit.js.coffee index 2adc4c2..7aafb0e 100644 --- a/app/assets/javascripts/cmtool/html_edit.js.coffee +++ b/app/assets/javascripts/cmtool/html_edit.js.coffee @@ -3,13 +3,14 @@ class HtmlEdit #ACE $('.html-content').each (i, el)-> text_field = $(el) - ace_div = $('
').addClass('ace-div').html(text_field.val()) + ace_div = $('
').addClass('ace-div') text_field.after ace_div ace_div.css width: '100%' height: '600px' editor = ace.edit(ace_div.get(0)) editor.setTheme 'ace/theme/monokai' + editor.setValue text_field.val(), -1 editor.getSession().setMode 'ace/mode/handlebars' editor.getSession().setTabSize(2) editor.getSession().setUseSoftTabs(true)