| | |
| | | selector: "textarea.text-editor", |
| | | statusbar: false, |
| | | menubar: false, |
| | | plugins: 'advlist charmap code image link lists media print preview save table textcolor', |
| | | plugins: 'advlist charmap code image link lists media print preview save table textcolor importcss', |
| | | toolbar: 'undo redo | styleselect | image | link unlink | bullist numlist | outdent indent | code', |
| | | /* |
| | | menu: { |
| | |
| | | }, |
| | | */ |
| | | resize: 'both', |
| | | importcss_append: true, |
| | | width: "100%", |
| | | height: '100%', |
| | | document_base_url : base + "/", |
| | |
| | | |
| | | /* ---- codemirror editor handling -------- */ |
| | | |
| | | function htmlDecode(value){ |
| | | return $('<div/>').html(value).text(); |
| | | } |
| | | |
| | | function fm_code_edit(content, m) { |
| | | cm = CodeMirror.fromTextArea(document.getElementById("editspace"), { |
| | | lineNumbers: true, |
| | |
| | | } |
| | | } |
| | | }); |
| | | cm.setValue(content); |
| | | cm.setValue(htmlDecode(content)); |
| | | } |
| | | |
| | | |