UNPKG

@progress/kendo-ui

Version:

This package is part of the [Kendo UI for jQuery](http://www.telerik.com/kendo-ui) suite.

1 lines 2.33 kB
module.exports=function(e){function t(o){if(i[o])return i[o].exports;var n=i[o]={exports:{},id:o,loaded:!1};return e[o].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var i={};return t.m=e,t.c=i,t.p="",t(0)}({0:function(e,t,i){e.exports=i(972)},3:function(e,t){e.exports=function(){throw Error("define cannot be used indirect")}},946:function(e,t){e.exports=require("../command")},972:function(e,t,i){var o,n,a;!function(l,define){n=[i(946)],o=l,a="function"==typeof o?o.apply(t,n):o,!(void 0!==a&&(e.exports=a))}(function(){!function(e,t){var i=window.kendo,o=e.extend,n=i.ui.editor,a=n.EditorUtils,l=n.Command,d=n.Tool,r=n.ToolTemplate,s=n.Dom,u=l.extend({init:function(e){var t=this;t.options=e,l.fn.init.call(t,e),t.attributes=null,t.async=!0},exec:function(){function o(e){m.deserialization.immutables=c.immutables,c.value(f.find(b).val()),m.deserialization.immutables=t,n(e),r.change&&r.change(),c.trigger("change")}function n(e){e.preventDefault(),f.data("kendoWindow").destroy(),c.immutables&&(c.immutables.serializedImmutables={}),c.focus()}var l,d,r=this,c=r.editor,m=c.options,p=c.options.messages,f=e(i.template(u.template)(p)).appendTo(document.body),b=".k-editor-textarea";m.serialization.immutables=c.immutables,d=s.getAllComments(c.body),l=a.cacheComments(c.value(),d),l=u.indent(l),l=a.retrieveComments(l,d),m.serialization.immutables=t,this.createDialog(f,{title:p.viewHtml,close:n,visible:!1}).find(b).val(l).end().find(".k-dialog-update").click(o).end().find(".k-dialog-close").click(n).end().data("kendoWindow").center().open(),f.find(b).focus()}});o(u,{template:"<div class='k-editor-dialog k-popup-edit-form k-viewhtml-dialog'><div class='k-edit-form-container'></div><textarea class='k-editor-textarea k-input'></textarea><div class='k-edit-buttons k-state-default'><button class='k-dialog-update k-button k-primary'>#: dialogUpdate #</button><button class='k-dialog-close k-button'>#: dialogCancel #</button></div></div></div>",indent:function(e){return e.replace(/<\/(p|li|ul|ol|h[1-6]|table|tr|td|th)>/gi,"</$1>\n").replace(/<(ul|ol)([^>]*)><li/gi,"<$1$2>\n<li").replace(/<br \/>/gi,"<br />\n").replace(/\n$/,"")}}),i.ui.editor.ViewHtmlCommand=u,n.EditorUtils.registerTool("viewHtml",new d({command:u,template:new r({template:a.buttonTemplate,title:"View HTML"})}))}(window.kendo.jQuery)},i(3))}});