( function( global, $ ) { var editor, $textarea = $( '#custom_css_textarea' ), syncCSS = function() { $textarea.val( editor.getSession().getValue() ); }, loadAce = function() { editor = ace.edit( 'custom_css' ); global.safecss_editor = editor; editor.getSession().setUseWrapMode( true ); editor.setShowPrintMargin( false ); editor.getSession().setValue( $textarea.val() ); editor.getSession().setMode( "ace/mode/css" ); editor.getSession().on( 'change', syncCSS ); jQuery.fn.spin&&$( '#custom_css_container' ).spin( false ); }; $textarea.hide(); $textarea.before( '