a:34:{s:9:"#provides";s:12:"dijit.Editor";s:9:"#resource";s:9:"Editor.js";s:9:"#requires";a:8:{i:0;a:2:{i:0;s:6:"common";i:1;s:22:"dijit._editor.RichText";}i:1;a:2:{i:0;s:6:"common";i:1;s:13:"dijit.Toolbar";}i:2;a:2:{i:0;s:6:"common";i:1;s:22:"dijit.ToolbarSeparator";}i:3;a:2:{i:0;s:6:"common";i:1;s:21:"dijit._editor._Plugin";}i:4;a:2:{i:0;s:6:"common";i:1;s:38:"dijit._editor.plugins.EnterKeyHandling";}i:5;a:2:{i:0;s:6:"common";i:1;s:19:"dijit._editor.range";}i:6;a:2:{i:0;s:6:"common";i:1;s:16:"dijit._Container";}i:7;a:3:{i:0;s:6:"common";i:1;s:9:"dojo.i18n";i:2;s:4:"dojo";}}s:12:"dijit.Editor";a:7:{s:4:"type";s:8:"Function";s:6:"chains";a:2:{s:9:"prototype";a:1:{i:0;s:22:"dijit._editor.RichText";}s:4:"call";a:1:{i:0;s:22:"dijit._editor.RichText";}}s:7:"summary";s:50:"Runs on widget initialization to setup arrays etc.";s:11:"description";s:517:"This widget provides basic WYSIWYG editing features, based on the browser's underlying rich text editing capability, accompanied by a toolbar (dijit.Toolbar). A plugin model is available to extend the editor's capabilities as well as the the options available in the toolbar. Content generation may vary across browsers, and clipboard operations may have different results, to name a few limitations. Note: this widget should not be used with the HTML <TEXTAREA> tag -- see dijit._editor.RichText for details.";s:6:"source";s:1339:" if(!dojo.isArray(this.plugins)){ this.plugins=["undo","redo","|","cut","copy","paste","|","bold","italic","underline","strikethrough","|", "insertOrderedList","insertUnorderedList","indent","outdent","|","justifyLeft","justifyRight","justifyCenter","justifyFull", "dijit._editor.plugins.EnterKeyHandling" /*, "createLink"*/]; } this._plugins=[]; this._editInterval = this.editActionInterval * 1000; //IE will always lose focus when other element gets focus, while for FF and safari, //when no iframe is used, focus will be lost whenever another element gets focus. //For IE, we can connect to onBeforeDeactivate, which will be called right before //the focus is lost, so we can obtain the selected range. For other browsers, //no equivelent of onBeforeDeactivate, so we need to do two things to make sure //selection is properly saved before focus is lost: 1) when user clicks another //element in the page, in which case we listen to mousedown on the entire page and //see whether user clicks out of a focus editor, if so, save selection (focus will //only lost after onmousedown event is fired, so we can obtain correct caret pos.) //2) when user tabs away from the editor, which is handled in onKeyDown below. if(dojo.isIE){ this.events.push("onBeforeDeactivate"); }";s:4:"tags";s:7:"private";s:9:"classlike";b:1;}s:20:"dijit.Editor.plugins";a:4:{s:9:"prototype";s:12:"dijit.Editor";s:8:"instance";s:12:"dijit.Editor";s:4:"type";s:7:"String[";s:7:"summary";s:78:"A list of plugin names (as strings) or instances (as objects) for this widget.";}s:25:"dijit.Editor.extraPlugins";a:3:{s:9:"prototype";s:12:"dijit.Editor";s:4:"type";s:7:"String[";s:7:"summary";s:68:"A list of extra plugin names which will be appended to plugins array";}s:23:"dijit.Editor.postCreate";a:4:{s:9:"prototype";s:12:"dijit.Editor";s:4:"type";s:8:"Function";s:6:"source";s:3819:"dojo.provide("dijit.Editor"); dojo.require("dijit._editor.RichText"); dojo.require("dijit.Toolbar"); dojo.require("dijit.ToolbarSeparator"); dojo.require("dijit._editor._Plugin"); dojo.require("dijit._editor.plugins.EnterKeyHandling"); dojo.require("dijit._editor.range"); dojo.require("dijit._Container"); dojo.require("dojo.i18n"); dojo.requireLocalization("dijit._editor", "commands"); dojo.declare( "dijit.Editor", dijit._editor.RichText, { // summary: // A rich text Editing widget // // description: // This widget provides basic WYSIWYG editing features, based on the browser's // underlying rich text editing capability, accompanied by a toolbar (dijit.Toolbar). // A plugin model is available to extend the editor's capabilities as well as the // the options available in the toolbar. Content generation may vary across // browsers, and clipboard operations may have different results, to name // a few limitations. Note: this widget should not be used with the HTML // <TEXTAREA> tag -- see dijit._editor.RichText for details. // plugins: String[] // A list of plugin names (as strings) or instances (as objects) // for this widget. plugins: null, // extraPlugins: String[] // A list of extra plugin names which will be appended to plugins array extraPlugins: null, constructor: function(){ // summary: // Runs on widget initialization to setup arrays etc. // tags: // private if(!dojo.isArray(this.plugins)){ this.plugins=["undo","redo","|","cut","copy","paste","|","bold","italic","underline","strikethrough","|", "insertOrderedList","insertUnorderedList","indent","outdent","|","justifyLeft","justifyRight","justifyCenter","justifyFull", "dijit._editor.plugins.EnterKeyHandling" /*, "createLink"*/]; } this._plugins=[]; this._editInterval = this.editActionInterval * 1000; //IE will always lose focus when other element gets focus, while for FF and safari, //when no iframe is used, focus will be lost whenever another element gets focus. //For IE, we can connect to onBeforeDeactivate, which will be called right before //the focus is lost, so we can obtain the selected range. For other browsers, //no equivelent of onBeforeDeactivate, so we need to do two things to make sure //selection is properly saved before focus is lost: 1) when user clicks another //element in the page, in which case we listen to mousedown on the entire page and //see whether user clicks out of a focus editor, if so, save selection (focus will //only lost after onmousedown event is fired, so we can obtain correct caret pos.) //2) when user tabs away from the editor, which is handled in onKeyDown below. if(dojo.isIE){ this.events.push("onBeforeDeactivate"); } }, postCreate: function(){ //for custom undo/redo if(this.customUndo){ dojo['require']("dijit._editor.range"); this._steps=this._steps.slice(0); this._undoedSteps=this._undoedSteps.slice(0); // this.addKeyHandler('z',this.KEY_CTRL,this.undo); // this.addKeyHandler('y',this.KEY_CTRL,this.redo); } if(dojo.isArray(this.extraPlugins)){ this.plugins=this.plugins.concat(this.extraPlugins); } // try{ this.inherited(arguments); // dijit.Editor.superclass.postCreate.apply(this, arguments); this.commands = dojo.i18n.getLocalization("dijit._editor", "commands", this.lang); if(!this.toolbar){ // if we haven't been assigned a toolbar, create one this.toolbar = new dijit.Toolbar({}); dojo.place(this.toolbar.domNode, this.editingArea, "before"); } dojo.forEach(this.plugins, this.addPlugin, this); this.onNormalizedDisplayChanged(); //update toolbar button status // }catch(e){ console.debug(e); } this.toolbar.startup();";s:7:"summary";s:0:"";}s:20:"dijit.Editor.destroy";a:4:{s:9:"prototype";s:12:"dijit.Editor";s:4:"type";s:8:"Function";s:6:"source";s:209:" dojo.forEach(this._plugins, function(p){ if(p && p.destroy){ p.destroy(); } }); this._plugins=[]; this.toolbar.destroyRecursive(); delete this.toolbar; this.inherited(arguments);";s:7:"summary";s:0:"";}s:22:"dijit.Editor.addPlugin";a:5:{s:9:"prototype";s:12:"dijit.Editor";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:6:"plugin";a:2:{s:4:"type";s:14:"String||Object";s:7:"summary";s:98:"String, args object or plugin instance args: This object will be passed to the plugin constructor";}s:5:"index";a:3:{s:8:"optional";b:1;s:4:"type";s:7:"Integer";s:7:"summary";s:143:"Used when creating an instance from something already in this.plugins. Ensures that the new instance is assigned to this.plugins at that index.";}}s:6:"source";s:644:" var args=dojo.isString(plugin)?{name:plugin}:plugin; if(!args.setEditor){ var o={"args":args,"plugin":null,"editor":this}; dojo.publish(dijit._scopeName + ".Editor.getPlugin",[o]); if(!o.plugin){ var pc = dojo.getObject(args.name); if(pc){ o.plugin=new pc(args); } } if(!o.plugin){ console.warn('Cannot find plugin',plugin); return; } plugin=o.plugin; } if(arguments.length > 1){ this._plugins[index] = plugin; }else{ this._plugins.push(plugin); } plugin.setEditor(this); if(dojo.isFunction(plugin.setToolbar)){ plugin.setToolbar(this.toolbar); }";s:7:"summary";s:325:"takes a plugin name as a string or a plugin instance and adds it to the toolbar and associates it with this editor instance. The resulting plugin is added to the Editor's plugins array. If index is passed, it's placed in the plugins array at that index. No big magic, but a nice helper for passing in plugin names via markup.";}s:20:"dijit.Editor.startup";a:5:{s:9:"prototype";s:12:"dijit.Editor";s:4:"type";s:8:"Function";s:6:"source";s:197:" // summary: // Exists to make Editor work as a child of a layout widget. // Developers don't need to call this method. // tags: // protected //console.log('startup',arguments);";s:7:"summary";s:100:"Exists to make Editor work as a child of a layout widget. Developers don't need to call this method.";s:4:"tags";s:43:"protected console.log('startup',arguments);";}s:19:"dijit.Editor.resize";a:6:{s:9:"prototype";s:12:"dijit.Editor";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"size";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:69:" dijit.layout._LayoutWidget.prototype.resize.apply(this,arguments);";s:7:"summary";s:80:"Resize the editor to the specified size, see `dijit.layout._LayoutWidget.resize`";s:6:"chains";a:1:{s:4:"call";a:1:{i:0;s:43:"dijit.layout._LayoutWidget.prototype.resize";}}}s:19:"dijit.Editor.layout";a:5:{s:9:"prototype";s:12:"dijit.Editor";s:4:"type";s:8:"Function";s:6:"source";s:190:" this.editingArea.style.height=(this._contentBox.h - dojo.marginBox(this.toolbar.domNode).h)+"px"; if(this.iframe){ this.iframe.style.height="100%"; } this._layoutMode = true;";s:7:"summary";s:83:"Called from `dijit.layout._LayoutWidget.resize`. This shouldn't be called directly";s:4:"tags";s:9:"protected";}s:27:"dijit.Editor._onIEMouseDown";a:7:{s:9:"prototype";s:12:"dijit.Editor";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:1:"e";a:1:{s:4:"type";s:5:"Event";}}s:6:"source";s:204:" delete this._savedSelection; // new mouse position overrides old selection if(e.target.tagName == "BODY"){ setTimeout(dojo.hitch(this, "placeCursorAtEnd"), 0); } this.inherited(arguments);";s:7:"summary";s:36:"IE only to prevent 2 clicks to focus";s:4:"tags";s:7:"private";s:7:"private";b:1;}s:31:"dijit.Editor.onBeforeDeactivate";a:6:{s:9:"prototype";s:12:"dijit.Editor";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:1:"e";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:257:" if(this.customUndo){ this.endEditing(true); } //in IE, the selection will be lost when other elements get focus, //let's save focus before the editor is deactivated this._saveSelection(); //console.log('onBeforeDeactivate',this);";s:7:"summary";s:68:"Called on IE right before focus is lost. Saves the selected range.";s:4:"tags";s:7:"private";}s:23:"dijit.Editor.customUndo";a:3:{s:9:"prototype";s:12:"dijit.Editor";s:4:"type";s:7:"Boolean";s:7:"summary";s:269:"Whether we shall use custom undo/redo support instead of the native browser support. By default, we only enable customUndo for IE, as it has broken native undo/redo support. Note: the implementation does support other browsers which have W3C DOM2 Range API implemented.";}s:31:"dijit.Editor.editActionInterval";a:3:{s:9:"prototype";s:12:"dijit.Editor";s:4:"type";s:7:"Integer";s:7:"summary";s:342:"When using customUndo, not every keystroke will be saved as a step. Instead typing (including delete) will be grouped together: after a user stops typing for editActionInterval seconds, a step will be saved; if a user resume typing within editActionInterval seconds, the timeout will be restarted. By default, editActionInterval is 3 seconds.";}s:25:"dijit.Editor.beginEditing";a:6:{s:9:"prototype";s:12:"dijit.Editor";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:3:"cmd";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:279:" if(!this._inEditing){ this._inEditing=true; this._beginEditing(cmd); } if(this.editActionInterval>0){ if(this._editTimer){ clearTimeout(this._editTimer); } this._editTimer = setTimeout(dojo.hitch(this, this.endEditing), this._editInterval); }";s:7:"summary";s:157:"Called to note that the user has started typing alphanumeric characters, if it's not already noted. Deals with saving undo; see editActionInterval parameter.";s:4:"tags";s:7:"private";}s:19:"dijit.Editor._steps";a:4:{s:9:"prototype";s:12:"dijit.Editor";s:8:"instance";s:12:"dijit.Editor";s:7:"private";b:1;s:7:"summary";s:0:"";}s:25:"dijit.Editor._undoedSteps";a:3:{s:8:"instance";s:12:"dijit.Editor";s:7:"private";b:1;s:7:"summary";s:0:"";}s:21:"dijit.Editor.commands";a:2:{s:8:"instance";s:12:"dijit.Editor";s:7:"summary";s:0:"";}s:20:"dijit.Editor.toolbar";a:2:{s:8:"instance";s:12:"dijit.Editor";s:7:"summary";s:0:"";}s:21:"dijit.Editor._plugins";a:3:{s:8:"instance";s:12:"dijit.Editor";s:7:"private";b:1;s:7:"summary";s:0:"";}s:37:"dijit.Editor.editingArea.style.height";a:2:{s:8:"instance";s:12:"dijit.Editor";s:7:"summary";s:0:"";}s:32:"dijit.Editor.iframe.style.height";a:2:{s:8:"instance";s:12:"dijit.Editor";s:7:"summary";s:0:"";}s:24:"dijit.Editor._layoutMode";a:3:{s:8:"instance";s:12:"dijit.Editor";s:7:"private";b:1;s:7:"summary";s:0:"";}s:23:"dijit.Editor._inEditing";a:3:{s:8:"instance";s:12:"dijit.Editor";s:7:"private";b:1;s:7:"summary";s:0:"";}s:23:"dijit.Editor._editTimer";a:3:{s:8:"instance";s:12:"dijit.Editor";s:7:"private";b:1;s:7:"summary";s:0:"";}s:26:"dijit.Editor._editInterval";a:3:{s:8:"instance";s:12:"dijit.Editor";s:7:"private";b:1;s:7:"summary";s:0:"";}s:4:"args";a:1:{s:7:"summary";s:0:"";}s:2:"_p";a:2:{s:7:"private";b:1;s:7:"summary";s:0:"";}s:4:"name";a:1:{s:7:"summary";s:0:"";}s:1:"p";a:1:{s:7:"summary";s:0:"";}s:8:"o.plugin";a:1:{s:7:"summary";s:0:"";}s:5:"dijit";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}}