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 | 2098 +---------------------------------------- 1 file changed, 2 insertions(+), 2096 deletions(-) (limited to 'lib/dijit/_editor/RichText.js') diff --git a/lib/dijit/_editor/RichText.js b/lib/dijit/_editor/RichText.js index 978371557..afa4a944d 100644 --- a/lib/dijit/_editor/RichText.js +++ b/lib/dijit/_editor/RichText.js @@ -1,2096 +1,2 @@ -/* - Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved. - Available via Academic Free License >= 2.1 OR the modified BSD license. - see: http://dojotoolkit.org/license for details -*/ - - -if(!dojo._hasResource["dijit._editor.RichText"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code. -dojo._hasResource["dijit._editor.RichText"] = true; -dojo.provide("dijit._editor.RichText"); -dojo.require("dijit._Widget"); -dojo.require("dijit._CssStateMixin"); -dojo.require("dijit._editor.selection"); -dojo.require("dijit._editor.range"); -dojo.require("dijit._editor.html"); - - -// used to restore content when user leaves this page then comes back -// but do not try doing dojo.doc.write if we are using xd loading. -// dojo.doc.write will only work if RichText.js is included in the dojo.js -// file. If it is included in dojo.js and you want to allow rich text saving -// for back/forward actions, then set dojo.config.allowXdRichTextSave = true. -if(!dojo.config["useXDomain"] || dojo.config["allowXdRichTextSave"]){ - if(dojo._postLoad){ - (function(){ - var savetextarea = dojo.doc.createElement('textarea'); - savetextarea.id = dijit._scopeName + "._editor.RichText.value"; - dojo.style(savetextarea, { - display:'none', - position:'absolute', - top:"-100px", - height:"3px", - width:"3px" - }); - dojo.body().appendChild(savetextarea); - })(); - }else{ - //dojo.body() is not available before onLoad is fired - try{ - dojo.doc.write(''); - }catch(e){ } - } -} - -dojo.declare("dijit._editor.RichText", [dijit._Widget, dijit._CssStateMixin], { - constructor: function(params){ - // 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 - - // 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 && dojo.isString(params.value)){ - this.value = params.value; - } - - this.onLoadDeferred = new dojo.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)