<textarea name="{{ widget.name }}"{% include "django/forms/widgets/attrs.html" %}>
{% if widget.value %}{{ widget.value }}{% endif %}</textarea>
<script>
    var pippo = function(a){
        var $sender = django.jQuery('#' + a);
        $sender.trigger('change')
        $sender.trigger('input')
        parent.AdminExtraUrl.update()
    }
    editAreaLoader.init({
			id: "id_code"	// id of the textarea to transform
			,start_highlight: true	// if start with highlight
			,allow_resize: "both"
			{#,allow_toggle: true#}
            ,font_family: "verdana, monospace"
            ,font_size: 12
			,word_wrap: true
			,language: "en"
			,syntax: "python"
            ,toolbar: "undo, redo, fullscreen"
            {#,display: "later"#}
			,replace_tab_by_spaces: 4
            ,min_width: 800
            ,min_height: 350
            {#,toolbar: "search, go_to_line, |, undo, redo, |, select_font, |, syntax_selection, |, change_smooth_selection, highlight, reset_highlight, |, help"#}
			{#,syntax_selection_allow: "css,html,js,php,python,vb,xml,c,cpp,sql,basic,pas,brainfuck"#}
			{#,is_multi_files: true#}
			{#,EA_load_callback: "editAreaLoaded"#}
			,show_line_colors: true
            ,change_callback: "pippo"
		});
</script>
