define("dijit/_editor/RichText", [ "dojo/_base/array", // array.forEach array.indexOf array.some "dojo/_base/config", // config "dojo/_base/declare", // declare "dojo/_base/Deferred", // Deferred "dojo/dom", // dom.byId "dojo/dom-attr", // domAttr.set or get "dojo/dom-class", // domClass.add domClass.remove "dojo/dom-construct", // domConstruct.create domConstruct.destroy domConstruct.place "dojo/dom-geometry", // domGeometry.position "dojo/dom-style", // domStyle.getComputedStyle domStyle.set "dojo/_base/event", // event.stop "dojo/_base/kernel", // kernel.deprecated "dojo/keys", // keys.BACKSPACE keys.TAB "dojo/_base/lang", // lang.clone lang.hitch lang.isArray lang.isFunction lang.isString lang.trim "dojo/on", // on() "dojo/query", // query "dojo/ready", // ready "dojo/sniff", // has("ie") has("mozilla") has("opera") has("safari") has("webkit") "dojo/topic", // topic.publish() (publish) "dojo/_base/unload", // unload "dojo/_base/url", // url "dojo/_base/window", // win.global "../_Widget", "../_CssStateMixin", "./selection", "./range", "./html", "../focus", "../main" // dijit._scopeName ], function(array, config, declare, Deferred, dom, domAttr, domClass, domConstruct, domGeometry, domStyle, event, kernel, keys, lang, on, query, ready, has, topic, unload, _Url, win, _Widget, _CssStateMixin, selectionapi, rangeapi, htmlapi, focus, dijit){ // module: // dijit/_editor/RichText // summary: // dijit/_editor/RichText is the core of dijit/Editor, which provides basic // WYSIWYG editing features. // if you want to allow for rich text saving with back/forward actions, you must add a text area to your page with // the id==dijit._scopeName + "._editor.RichText.value" (typically "dijit/_editor/RichText.value). For example, // something like this will work: // // // var RichText = declare("dijit._editor.RichText", [_Widget, _CssStateMixin], { // summary: // dijit/_editor/RichText is the core of dijit.Editor, which provides basic // WYSIWYG editing features. // // description: // dijit/_editor/RichText is the core of dijit.Editor, which provides basic // WYSIWYG editing features. It also encapsulates the differences // of different js engines for various browsers. Do not use this widget // with an HTML <TEXTAREA> tag, since the browser unescapes XML escape characters, // like <. This can have unexpected behavior and lead to security issues // such as scripting attacks. // // tags: // private constructor: function(params /*===== , srcNodeRef =====*/){ // summary: // Create the widget. // params: Object|null // Initial settings for any of the widget attributes, except readonly attributes. // srcNodeRef: DOMNode // The widget replaces the specified DOMNode. // contentPreFilters: Function(String)[] // Pre content filter function register array. // these filters will be executed before the actual // editing area gets the html content. this.contentPreFilters = []; // contentPostFilters: Function(String)[] // post content filter function register array. // These will be used on the resulting html // from contentDomPostFilters. The resulting // content is the final html (returned by getValue()). this.contentPostFilters = []; // contentDomPreFilters: Function(DomNode)[] // Pre content dom filter function register array. // These filters are applied after the result from // contentPreFilters are set to the editing area. this.contentDomPreFilters = []; // contentDomPostFilters: Function(DomNode)[] // Post content dom filter function register array. // These filters are executed on the editing area dom. // The result from these will be passed to contentPostFilters. this.contentDomPostFilters = []; // editingAreaStyleSheets: dojo._URL[] // array to store all the stylesheets applied to the editing area this.editingAreaStyleSheets = []; // Make a copy of this.events before we start writing into it, otherwise we // will modify the prototype which leads to bad things on pages w/multiple editors this.events = [].concat(this.events); this._keyHandlers = {}; if(params && lang.isString(params.value)){ this.value = params.value; } this.onLoadDeferred = new Deferred(); }, baseClass: "dijitEditor", // inheritWidth: Boolean // whether to inherit the parent's width or simply use 100% inheritWidth: false, // focusOnLoad: [deprecated] Boolean // Focus into this widget when the page is loaded focusOnLoad: false, // name: String? // Specifies the name of a (hidden) `