@progress/kendo-ui
Version:
This package is part of the [Kendo UI for jQuery](http://www.telerik.com/kendo-ui) suite.
1 lines • 2.27 kB
JavaScript
module.exports=function(t){function e(n){if(o[n])return o[n].exports;var i=o[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var o={};return e.m=t,e.c=o,e.p="",e(0)}({0:function(t,e,o){o(932),t.exports=o(932)},3:function(t,e){t.exports=function(){throw Error("define cannot be used indirect")}},932:function(t,e,o){var n,i,r;!function(s,define){i=[o(933)],n=s,r="function"==typeof n?n.apply(e,i):n,!(void 0!==r&&(t.exports=r))}(function(){!function(t){function e(t,e){var o=t.selectionRestorePoint=new s(t.getRange(),t.body),n=new c(e,o);return n.editor=t,t.undoRedoStack.push(n),o}var o=window.kendo,n=o.Class,i=o.ui.editor,r=i.Dom,s=i.RestorePoint,a=i.Marker,d=t.extend,u=n.extend({init:function(t){this.options=t,this.restorePoint=new s(t.range,t.body,{immutables:t.immutables}),this.marker=new a,this.formatter=t.formatter},getRange:function(){return this.restorePoint.toRange()},lockRange:function(t){return this.marker.add(this.getRange(),t)},releaseRange:function(t){this.marker.remove(t),this.editor.selectRange(t)},undo:function(){var t=this.restorePoint;t.restoreHtml(),this.editor.selectRange(t.toRange())},redo:function(){this.exec()},createDialog:function(e,n){var i=this.editor;return t(e).appendTo(document.body).kendoWindow(d({},i.options.dialogOptions,n)).closest(".k-window").toggleClass("k-rtl",o.support.isRtl(i.wrapper)).end()},exec:function(){var t=this.lockRange(!0);this.formatter.editor=this.editor,this.formatter.toggle(t),this.releaseRange(t)},immutables:function(){return this.editor&&this.editor.options.immutables},expandImmutablesIn:function(t){this.immutables()&&(o.ui.editor.Immutables.expandImmutablesIn(t),this.restorePoint=new s(t,this.editor.body))}}),c=n.extend({init:function(t,e){this.body=t.body,this.startRestorePoint=t,this.endRestorePoint=e},redo:function(){r.removeChildren(this.body),this.body.innerHTML=this.endRestorePoint.html,this.editor.selectRange(this.endRestorePoint.toRange())},undo:function(){r.removeChildren(this.body),this.body.innerHTML=this.startRestorePoint.html,this.editor.selectRange(this.startRestorePoint.toRange())}});d(i,{_finishUpdate:e,Command:u,GenericCommand:c})}(window.kendo.jQuery)},o(3))},933:function(t,e){t.exports=require("./immutables")}});