a:18:{s:9:"#provides";s:23:"dijit._editor.selection";s:9:"#resource";s:20:"_editor/selection.js";s:31:"dijit._editor.selection.getType";a:4:{s:4:"type";s:8:"Function";s:6:"source";s:584:"		if(dojo.doc.selection){ //IE
			return dojo.doc.selection.type.toLowerCase();
		}else{
			var stype = "text";


			// Check if the actual selection is a CONTROL (IMG, TABLE, HR, etc...).
			var oSel;
			try{
				oSel = dojo.global.getSelection();
			}catch(e){ /*squelch*/ }


			if(oSel && oSel.rangeCount==1){
				var oRange = oSel.getRangeAt(0);
				if(	(oRange.startContainer == oRange.endContainer) &&
					((oRange.endOffset - oRange.startOffset) == 1) &&
					(oRange.startContainer.nodeType != 3 /* text node*/)
				){
					stype = "control";
				}
			}
			return stype;
		}";s:7:"summary";s:57:"Get the selection type (like dojo.doc.select.type in IE).";s:14:"private_parent";b:1;}s:39:"dijit._editor.selection.getSelectedText";a:4:{s:4:"type";s:8:"Function";s:6:"source";s:284:"		if(dojo.doc.selection){ //IE
			if(dijit._editor.selection.getType() == 'control'){
				return null;
			}
			return dojo.doc.selection.createRange().text;
		}else{
			var selection = dojo.global.getSelection();
			if(selection){
				return selection.toString();
			}
		}
		return ''";s:7:"summary";s:95:"Return the text (no html tags) included in the current selection or null if no text is selected";s:14:"private_parent";b:1;}s:39:"dijit._editor.selection.getSelectedHtml";a:4:{s:4:"type";s:8:"Function";s:6:"source";s:437:"		if(dojo.doc.selection){ //IE
			if(dijit._editor.selection.getType() == 'control'){
				return null;
			}
			return dojo.doc.selection.createRange().htmlText;
		}else{
			var selection = dojo.global.getSelection();
			if(selection && selection.rangeCount){
				var frag = selection.getRangeAt(0).cloneContents();
				var div = dojo.doc.createElement("div");
				div.appendChild(frag);
				return div.innerHTML;
			}
			return null;
		}";s:7:"summary";s:63:"Return the html of the current selection or null if unavailable";s:14:"private_parent";b:1;}s:42:"dijit._editor.selection.getSelectedElement";a:4:{s:4:"type";s:8:"Function";s:6:"source";s:376:"		if(dijit._editor.selection.getType() == "control"){
			if(dojo.doc.selection){ //IE
				var range = dojo.doc.selection.createRange();
				if(range && range.item){
					return dojo.doc.selection.createRange().item(0);
				}
			}else{
				var selection = dojo.global.getSelection();
				return selection.anchorNode.childNodes[ selection.anchorOffset ];
			}
		}
		return null;";s:7:"summary";s:127:"Retrieves the selected element (if any), just in the case that
a single element (object like and image or a table) is
selected.";s:14:"private_parent";b:1;}s:40:"dijit._editor.selection.getParentElement";a:4:{s:4:"type";s:8:"Function";s:6:"source";s:525:"		if(dijit._editor.selection.getType() == "control"){
			var p = this.getSelectedElement();
			if(p){ return p.parentNode; }
		}else{
			if(dojo.doc.selection){ //IE
				var r=dojo.doc.selection.createRange();
				r.collapse(true);
				return r.parentElement();
			}else{
				var selection = dojo.global.getSelection();
				if(selection){
					var node = selection.anchorNode;


					while(node && (node.nodeType != 1)){ // not an element
						node = node.parentNode;
					}


					return node;
				}
			}
		}
		return null;";s:7:"summary";s:47:"Get the parent element of the current selection";s:14:"private_parent";b:1;}s:42:"dijit._editor.selection.hasAncestorElement";a:6:{s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:7:"tagName";a:2:{s:9:"repeating";b:1;s:4:"type";s:7:"String ";}}s:6:"source";s:64:"		return this.getAncestorElement.apply(this, arguments) != null;";s:7:"summary";s:118:"Check whether current selection has a  parent element which is
of type tagName (or one of the other specified tagName)";s:6:"chains";a:1:{s:4:"call";a:1:{i:0;s:23:"this.getAncestorElement";}}s:14:"private_parent";b:1;}s:42:"dijit._editor.selection.getAncestorElement";a:5:{s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:7:"tagName";a:2:{s:9:"repeating";b:1;s:4:"type";s:7:"String ";}}s:6:"source";s:114:"		var node = this.getSelectedElement() || this.getParentElement();
		return this.getParentOfType(node, arguments);";s:7:"summary";s:115:"Return the parent element of the current selection which is of
type tagName (or one of the other specified tagName)";s:14:"private_parent";b:1;}s:29:"dijit._editor.selection.isTag";a:5:{s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:4:"node";a:1:{s:4:"type";s:7:"DomNode";}s:4:"tags";a:1:{s:4:"type";s:5:"Array";}}s:6:"source";s:220:"		if(node && node.tagName){
			var _nlc = node.tagName.toLowerCase();
			for(var i=0; i<tags.length; i++){
				var _tlc = String(tags[i]).toLowerCase();
				if(_nlc == _tlc){
					return _tlc;
				}
			}
		}
		return "";";s:14:"private_parent";b:1;s:7:"summary";s:0:"";}s:39:"dijit._editor.selection.getParentOfType";a:5:{s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:4:"node";a:1:{s:4:"type";s:7:"DomNode";}s:4:"tags";a:1:{s:4:"type";s:5:"Array";}}s:6:"source";s:120:"		while(node){
			if(this.isTag(node, tags).length){
				return node;
			}
			node = node.parentNode;
		}
		return null;";s:14:"private_parent";b:1;s:7:"summary";s:0:"";}s:32:"dijit._editor.selection.collapse";a:5:{s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:9:"beginning";a:1:{s:4:"type";s:7:"Boolean";}}s:6:"source";s:660:"	  if(window['getSelection']){
	          var selection = dojo.global.getSelection();
	          if(selection.removeAllRanges){ // Mozilla
	                  if(beginning){
	                          selection.collapseToStart();
	                  }else{
	                          selection.collapseToEnd();
	                  }
	          }else{ // Safari
	                  // pulled from WebCore/ecma/kjs_window.cpp, line 2536
	                   selection.collapse(beginning);
	          }
	  }else if(dojo.doc.selection){ // IE
	          var range = dojo.doc.selection.createRange();
	          range.collapse(beginning);
	          range.select();
	  }";s:7:"summary";s:23:"clear current selection";s:14:"private_parent";b:1;}s:30:"dijit._editor.selection.remove";a:4:{s:4:"type";s:8:"Function";s:6:"source";s:211:"		var _s = dojo.doc.selection;
		if(_s){ //IE
			if(_s.type.toLowerCase() != "none"){
				_s.clear();
			}
			return _s;
		}else{
			_s = dojo.global.getSelection();
			_s.deleteFromDocument();
			return _s;
		}";s:7:"summary";s:24:"delete current selection";s:14:"private_parent";b:1;}s:45:"dijit._editor.selection.selectElementChildren";a:5:{s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:7:"element";a:1:{s:4:"type";s:7:"DomNode";}s:13:"nochangefocus";a:2:{s:8:"optional";b:1;s:4:"type";s:7:"Boolean";}}s:6:"source";s:714:"		var _window = dojo.global;
		var _document = dojo.doc;
		element = dojo.byId(element);
		if(_document.selection && dojo.body().createTextRange){ // IE
			var range = element.ownerDocument.body.createTextRange();
			range.moveToElementText(element);
			if(!nochangefocus){
				try{
					range.select(); // IE throws an exception here if the widget is hidden.  See #5439
				}catch(e){ /* squelch */}
			}
		}else if(_window.getSelection){
			var selection = _window.getSelection();
			if(selection.setBaseAndExtent){ // Safari
				selection.setBaseAndExtent(element, 0, element, element.innerText.length - 1);
			}else if(selection.selectAllChildren){ // Mozilla
				selection.selectAllChildren(element);
			}
		}";s:7:"summary";s:87:"clear previous selection and select the content of the node
(excluding the node itself)";s:14:"private_parent";b:1;}s:37:"dijit._editor.selection.selectElement";a:5:{s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:7:"element";a:1:{s:4:"type";s:7:"DomNode";}s:13:"nochangefocus";a:2:{s:8:"optional";b:1;s:4:"type";s:7:"Boolean";}}s:6:"source";s:650:"		var range, _document = dojo.doc;
		element = dojo.byId(element);
		if(_document.selection && dojo.body().createTextRange){ // IE
			try{
				range = dojo.body().createControlRange();
				range.addElement(element);
				if(!nochangefocus){
					range.select();
				}
			}catch(e){
				this.selectElementChildren(element,nochangefocus);
			}
		}else if(dojo.global.getSelection){
			var selection = dojo.global.getSelection();
			// FIXME: does this work on Safari?
			if(selection.removeAllRanges){ // Mozilla
				range = _document.createRange();
				range.selectNode(element);
				selection.removeAllRanges();
				selection.addRange(range);
			}
		}";s:7:"summary";s:72:"clear previous selection and select element (including all its children)";s:14:"private_parent";b:1;}s:23:"dijit._editor.selection";a:3:{s:4:"type";s:6:"Object";s:14:"private_parent";b:1;s:7:"summary";s:0:"";}s:13:"dijit._editor";a:3:{s:4:"type";s:6:"Object";s:7:"private";b:1;s:7:"summary";s:0:"";}s:5:"dijit";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}}