Cider

tiny canvas text editor [more demos] ()

var example = { require : function(name, args) { var obj = args[0]; obj.features = obj.features || {}; for (var i=0; i<obj.features.length; i++) { if (obj.features[i] === name) { return } } if (!obj.features[name]) { if (typeof carena.features[name] !== 'function') { throw new Error("Feature '" + name + "' is not registered!"); } //obj.features[name] = carena.features[name]; if (!obj.features) { obj.features = []; } obj.features.unshift(name); carena.features[name].apply(obj, args); } } };