From 1354d17270961fff662d40f90521223f8fd0d73b Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 14 Aug 2012 18:59:10 +0400 Subject: update dojo to 1.7.3 --- lib/dijit/_editor/RichText.js.uncompressed.js | 2891 +++++++++++++++++++++++++ 1 file changed, 2891 insertions(+) create mode 100644 lib/dijit/_editor/RichText.js.uncompressed.js (limited to 'lib/dijit/_editor/RichText.js.uncompressed.js') diff --git a/lib/dijit/_editor/RichText.js.uncompressed.js b/lib/dijit/_editor/RichText.js.uncompressed.js new file mode 100644 index 000000000..9e385fbb4 --- /dev/null +++ b/lib/dijit/_editor/RichText.js.uncompressed.js @@ -0,0 +1,2891 @@ +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.getMarginBox 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/_base/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.body win.doc.body.focus win.doc.createElement win.global.location win.withGlobal + "../_Widget", + "../_CssStateMixin", + "./selection", + "./range", + "./html", + "../focus", + ".." // 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){ + +/*===== + var _Widget = dijit._Widget; + var _CssStateMixin = dijit._CssStateMixin; +=====*/ + +// 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){ + // 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)