//>>built
define("dojox/editor/plugins/SafePaste","dojo dijit dojox dojox/editor/plugins/PasteFromWord dijit/Dialog dojo/_base/connect dojo/_base/declare dojo/i18n dojo/string dojo/i18n!dojox/editor/plugins/nls/SafePaste dojo/i18n!dijit/nls/common dojo/i18n!dijit/_editor/nls/commands".split(" "),function(b,d,h,g){var f=b.declare("dojox.editor.plugins.SafePaste",[g],{_initButton:function(){this._filters=this._filters.slice(0);var a=b.i18n.getLocalization("dojox.editor.plugins","SafePaste");b.mixin(a,b.i18n.getLocalization("dijit",
"common"));b.mixin(a,b.i18n.getLocalization("dijit._editor","commands"));this._uId=d.getUniqueId(this.editor.id);a.uId=this._uId;a.width=this.width||"400px";a.height=this.height||"300px";this._dialog=(new d.Dialog({title:a.paste})).placeAt(b.body());this._dialog.set("content",b.string.substitute(this._template,a));b.style(b.byId(this._uId+"_rte"),"opacity",.001);this.connect(d.byId(this._uId+"_paste"),"onClick","_paste");this.connect(d.byId(this._uId+"_cancel"),"onClick","_cancel");this.connect(this._dialog,
"onHide","_clearDialog");b.forEach(this.stripTags,function(c){c+="";var e=new RegExp("\x3c\\\\?\\/\\s*"+c+"\\s*\x3e","igm");this._filters.push({regexp:new RegExp("\x3c\\s*"+c+"[^\x3e]*\x3e","igm"),handler:""});this._filters.push({regexp:e,handler:""})},this)},updateState:function(){},setEditor:function(a){this.editor=a;this._initButton();this.editor.onLoadDeferred.addCallback(b.hitch(this,function(){var c=b.hitch(this,function(e){e&&b.stopEvent(e);this._openDialog();return!0});this.connect(this.editor.editNode,
"onpaste",c);this.editor._pasteImpl=c}))}});b.subscribe(d._scopeName+".Editor.getPlugin",null,function(a){a.plugin||"safepaste"!==a.args.name.toLowerCase()||(a.plugin=new f({width:a.args.hasOwnProperty("width")?a.args.width:"400px",height:a.args.hasOwnProperty("height")?a.args.width:"300px",stripTags:a.args.hasOwnProperty("stripTags")?a.args.stripTags:null}))});return f});