1 {% load toolbar_tags %}
3 <div class="iframe-container" style="position: absolute; top: 41pt; left:0px; right:0px; bottom: 0px;">
4 <textarea name="text">{{ text }}</textarea>
9 <script type="text/javascript" charset="utf-8">
14 var panel = self.contentDiv;
16 var textareaId = 'xmleditor-' + Math.ceil(Math.random() * 1000000000);
17 $('textarea', panel).attr('id', textareaId);
19 var texteditor = CodeMirror.fromTextArea(textareaId, {
20 parserfile: 'parsexml.js',
21 path: "{{STATIC_URL}}js/codemirror/",
22 stylesheet: "{{STATIC_URL}}css/xmlcolors.css",
23 parserConfig: {useHTMLKludges: false},
24 onChange: function() {
25 self.fireEvent('contentChanged');
27 initCallback: function(editor) {
29 // Buttons are connected
30 // register callbacks for actions
32 $.fbind(self, self.hotkeyPressed),
33 $.fbind(self, self.isHotkey) );
37 $(texteditor.frame).css({width: '100%', height: '100%'});
38 this.texteditor = texteditor;
42 this.texteditor = null;
46 //refresh: function() { }, // no support for refresh
48 saveInfo: function(saveInfo) {
50 url: "{% url file_xml fpath %}",
52 content: this.texteditor.getCode()
55 $.extend(saveInfo, myInfo);