Files
edx-platform/xmodule/js/src/raw/edit/xml.js
2022-06-20 18:20:06 +05:00

30 lines
976 B
JavaScript

// Once generated by CoffeeScript 1.9.3, but now lives as pure JS
/* eslint-disable */
(function() {
var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;
this.XMLEditingDescriptor = (function(superClass) {
extend(XMLEditingDescriptor, superClass);
function XMLEditingDescriptor(element) {
this.element = element;
this.edit_box = CodeMirror.fromTextArea($(".edit-box", this.element)[0], {
mode: "xml",
lineNumbers: true,
lineWrapping: true
});
}
XMLEditingDescriptor.prototype.save = function() {
return {
data: this.edit_box.getValue()
};
};
return XMLEditingDescriptor;
})(XModule.Descriptor);
}).call(this);