Index: /CKEditor/trunk/_dev/docs_build/docs_build.conf
===================================================================
--- /CKEditor/trunk/_dev/docs_build/docs_build.conf	(revision 4903)
+++ /CKEditor/trunk/_dev/docs_build/docs_build.conf	(revision 4904)
@@ -17,6 +17,11 @@
 		'../../_source/core/',
 		'../../_source/plugins/',
-		'../../_source/skins/kama/skin.js',
-		'../../_source/lang/en.js'
+		'../../_source/skins/kama/skin.js'
+	],
+
+	// Files to exclude.
+	E:
+	[
+		'yui.js'
 	],
 
Index: /CKEditor/trunk/_dev/docs_build/template/allfiles.tmpl
===================================================================
--- /CKEditor/trunk/_dev/docs_build/template/allfiles.tmpl	(revision 4903)
+++ /CKEditor/trunk/_dev/docs_build/template/allfiles.tmpl	(revision 4904)
@@ -3,5 +3,5 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 	<head>
-		<meta http-equiv="content-type" content="text/html; charset={+IO.encoding+}"" />
+		<meta http-equiv="content-type" content="text/html; charset={+IO.encoding+}" />
 		{! Link.base = ""; /* all generated links will be relative to this */ !}
 		<title>File Index - CKEditor 3 JavaScript API Documentation</title>
@@ -26,5 +26,5 @@
 			<div>
 				<h2>{+new Link().toSrc(item.alias).withText(item.name)+}</h2>
-				<if test="item.desc">{+resolveLinks(summarize(item.desc))+}</if>
+				<if test="item.desc">{+resolveLinks(item.desc)+}</if>
 				<dl>
 					<if test="item.author">
Index: /CKEditor/trunk/_dev/docs_build/template/class.tmpl
===================================================================
--- /CKEditor/trunk/_dev/docs_build/template/class.tmpl	(revision 4903)
+++ /CKEditor/trunk/_dev/docs_build/template/class.tmpl	(revision 4904)
@@ -51,4 +51,7 @@
 <!-- ============================== class summary ========================== -->			
 			<p class="description">
+				<if test="data.version"><br />Version
+					{+ data.version +}.<br />
+				</if>
 				<if test="data.augments.length"><br />Extends
 					{+
@@ -210,5 +213,5 @@
 							!}&nbsp;</td>
 							<td class="nameDescription">
-								<div class="fixedFont"><if test="member.isStatic && member.memberOf != '_global_'">{+member.memberOf+}.</if><b>{+new Link().toSymbol(member.alias).withText(member.name)+}</b>{+makeSignature(member.params)+}
+								<div class="fixedFont"><if test="member.isStatic && member.memberOf != '_global_'">{+member.memberOf+}.</if><b>{+new Link().toSymbol(member.alias).withText(member.name.replace(/\^\d+$/, ''))+}</b>{+makeSignature(member.params)+}
 								</div>
 								<div class="description">{+resolveLinks(summarize(member.desc))+}</div>
@@ -249,4 +252,64 @@
 			</if>
 
+<!-- ============================== events summary ======================== -->
+			<if test="data.events.length">
+				{! var ownEvents = data.events.filter(function($){return $.memberOf == data.alias  && !$.isNamespace}).sort(makeSortby("name")); !}
+				<if test="ownEvents.length">
+				<table class="summaryTable" cellspacing="0" summary="A summary of the events documented in the class {+data.alias+}.">
+					<caption>Event Summary</caption>
+					<thead>
+						<tr>
+							<th scope="col">Event Attributes</th>
+							<th scope="col">Event Name and Description</th>
+						</tr>
+					</thead>
+					<tbody>
+					<for each="member" in="ownEvents">
+						<tr>
+							<td class="attributes">{!
+								if (member.isPrivate) output += "&lt;private&gt; ";
+								if (member.isInner) output += "&lt;inner&gt; ";
+								if (member.isStatic) output += "&lt;static&gt; ";
+							!}&nbsp;</td>
+							<td class="nameDescription">
+								<div class="fixedFont"><if test="member.isStatic && member.memberOf != '_global_'">{+member.memberOf+}.</if><b>{+new Link().toSymbol(member.alias).withText(member.name)+}</b>{+makeSignature(member.params)+}
+								</div>
+								<div class="description">{+resolveLinks(summarize(member.desc))+}</div>
+							</td>
+						</tr>
+					</for>
+					</tbody>
+				</table>
+				</if>
+				
+				<if test="data.inheritsFrom.length">
+				<dl class="inheritsList">
+				{!
+					var borrowedMembers = data.events.filter(function($) {return $.memberOf != data.alias});
+					var contributers = [];
+					borrowedMembers.map(function($) {if (contributers.indexOf($.memberOf) < 0) contributers.push($.memberOf)});
+					for (var i = 0, l = contributers.length; i < l; i++) {
+						output +=
+							"<dt>Events borrowed from class "+new Link().toSymbol(contributers[i])+": </dt>"
+							+
+							"<dd>" +
+							borrowedMembers
+							.filter(
+								function($) { return $.memberOf == contributers[i] }
+							)
+							.sort(makeSortby("name"))
+							.map(
+								function($) { return new Link().toSymbol($.alias).withText($.name) }
+							)
+							.join(", ")
+							+
+							"</dd>";
+					}
+				
+				!}
+				</dl>
+				</if>
+			</if>
+
 <!-- ============================== constructor details ==================== -->		
 			<if test="!data.isBuiltin() && (data.isNamespace || data.is('CONSTRUCTOR'))">
@@ -398,5 +461,5 @@
 							<dt class="heading">Deprecated:</dt>
 							<dt>
-								{+ member.deprecated +}
+								{+ resolveLinks(member.deprecated) +}
 							</dt>
 							</dl>
@@ -437,5 +500,5 @@
 					
 					<span class="light">{{+ new Link().toSymbol( member.type || 'Undefined') +}}</span>
-					<if test="member.isStatic && member.memberOf != '_global_'"><span class="light">{+member.memberOf+}.</span></if><b>{+member.name+}</b>{+makeSignature(member.params)+}
+					<if test="member.isStatic && member.memberOf != '_global_'"><span class="light">{+member.memberOf+}.</span></if><b>{+member.name.replace(/\^\d+$/, '')+}</b>{+makeSignature(member.params)+}
 					
 					</div>
@@ -484,5 +547,5 @@
 							<dt class="heading">Deprecated:</dt>
 							<dt>
-								{+member.deprecated+}
+								{+resolveLinks(member.deprecated)+}
 							</dt>
 							</dl>
@@ -527,5 +590,104 @@
 				</for>
 			</if>
-			
+
+			<!-- ============================== event details ========================= -->		
+			<if test="defined(ownEvents) && ownEvents.length">
+				<div class="sectionTitle">
+					Event Detail
+				</div>
+				<for each="member" in="ownEvents">
+					<a name="event:{+Link.symbolNameToLinkName(member)+}"> </a>
+					<div class="fixedFont">{!
+						if (member.isPrivate) output += "&lt;private&gt; ";
+						if (member.isInner) output += "&lt;inner&gt; ";
+						if (member.isStatic) output += "&lt;static&gt; ";
+					!}
+					
+					<if test="member.type"><span class="light">{{+new Link().toSymbol(member.type)+}}</span></if>
+					<if test="member.isStatic && member.memberOf != '_global_'"><span class="light">{+member.memberOf+}.</span></if><b>{+member.name+}</b>{+makeSignature(member.params)+}
+					
+					</div>
+					<div class="description">
+						{+resolveLinks(member.desc)+}
+						<if test="member.srcFile != data.srcFile">
+							<br />
+							<i>Defined in: </i> {+new Link().toSrc(member.srcFile)+}.
+						</if>
+						<if test="member.author"><br /><i>Author: </i>{+member.author+}.</if>
+					</div>
+					
+					<if test="member.example.length">
+					<for each="example" in="member.example">
+					<pre class="code">{+example+}</pre>
+					</for>
+					</if>
+					
+						<if test="member.params.length">
+							<dl class="detailList">
+							<dt class="heading">Parameters:</dt>
+							<for each="item" in="member.params">
+								<dt>
+									{+((item.type)?"<span class=\"light fixedFont\">{"+(new Link().toSymbol(item.type))+"}</span> " : "")+}<b>{+item.name+}</b>
+									<if test="item.isOptional"><i>Optional<if test="item.defaultValue">, Default: {+item.defaultValue+}</if></i></if>
+								</dt>
+								<dd>{+ resolveLinks(item.desc) +}</dd>
+							</for>
+							</dl>
+						</if>
+						<if test="member.deprecated">
+							<dl class="detailList">
+							<dt class="heading">Deprecated:</dt>
+							<dt>
+								{+ resolveLinks(member.deprecated) +}
+							</dt>
+							</dl>
+						</if>
+						<if test="member.since">
+							<dl class="detailList">
+							<dt class="heading">Since:</dt>
+								<dd>{+ member.since +}</dd>
+							</dl>
+							</dl>
+						</if>
+						<if test="member.exceptions.length">
+							<dl class="detailList">
+							<dt class="heading">Throws:</dt>
+							<for each="item" in="member.exceptions">
+								<dt>
+									{+((item.type)?"<span class=\"light fixedFont\">{"+(new Link().toSymbol(item.type))+"}</span> " : "")+} <b>{+item.name+}</b>
+								</dt>
+								<dd>{+ resolveLinks(item.desc) +}</dd>
+							</for>
+							</dl>
+						</if>
+						<if test="member.returns.length">
+							<dl class="detailList">
+							<dt class="heading">Returns:</dt>
+							<for each="item" in="member.returns">
+								<dd>{+((item.type)?"<span class=\"light fixedFont\">{"+(new Link().toSymbol(item.type))+"}</span> " : "")+}{+resolveLinks(item.desc)+}</dd>
+							</for>
+							</dl>
+						</if>
+						<if test="member.requires.length">
+							<dl class="detailList">
+							<dt class="heading">Requires:</dt>
+							<for each="item" in="member.requires">
+								<dd>{+ resolveLinks(item) +}</dd>
+							</for>
+							</dl>
+						</if>
+						<if test="member.see.length">
+							<dl class="detailList">
+							<dt class="heading">See:</dt>
+							<for each="item" in="member.see">
+								<dd>{+ new Link().toSymbol(item) +}</dd>
+							</for>
+							</dl>
+						</if>
+
+					<if test="!$member_last"><hr /></if>
+				</for>
+			</if>
+
 			<hr />
 		</div>
Index: /CKEditor/trunk/_dev/docs_build/template/index.tmpl
===================================================================
--- /CKEditor/trunk/_dev/docs_build/template/index.tmpl	(revision 4903)
+++ /CKEditor/trunk/_dev/docs_build/template/index.tmpl	(revision 4904)
@@ -3,5 +3,5 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 	<head>
-		<meta http-equiv="content-type" content="text/html; charset={+IO.encoding+}"" />
+		<meta http-equiv="content-type" content="text/html; charset={+IO.encoding+}" />
 		
 		<title>CKEditor 3 JavaScript API Documentation</title>
Index: /CKEditor/trunk/_dev/docs_build/template/publish.js
===================================================================
--- /CKEditor/trunk/_dev/docs_build/template/publish.js	(revision 4903)
+++ /CKEditor/trunk/_dev/docs_build/template/publish.js	(revision 4904)
@@ -1,9 +1,10 @@
+/** Called automatically by JsDoc Toolkit. */
 function publish(symbolSet) {
 	publish.conf = {  // trailing slash expected for dirs
-		ext: ".html",
-		outDir: JSDOC.opt.d || SYS.pwd+"../out/jsdoc/",
-		templatesDir: JSDOC.opt.t.replace( /\/+$/, '' ) + '/',
-		symbolsDir: "symbols/",
-		srcDir: "symbols/src/"
+		ext:          ".html",
+		outDir:       JSDOC.opt.d || SYS.pwd+"../out/jsdoc/",
+		templatesDir: ( JSDOC.opt.t && JSDOC.opt.t.replace( /\/+$/, '' ) + '/' ) || SYS.pwd+"../templates/jsdoc/",
+		symbolsDir:   "symbols/",
+		srcDir:       "symbols/src/"
 	};
 	if (!IO.exists(publish.conf.templatesDir)) {
@@ -11,4 +12,5 @@
 	}
 
+	// is source output is suppressed, just display the links to the source file
 	if (JSDOC.opt.s && defined(Link) && Link.prototype._makeSrcLink) {
 		Link.prototype._makeSrcLink = function(srcFilePath) {
@@ -17,9 +19,11 @@
 	}
 
+	// create the folders and subfolders to hold the output
 	IO.mkPath((publish.conf.outDir+"symbols/src").split("/"));
 
-	// used to check the details of things being linked to
+	// used to allow Link to check the details of things being linked to
 	Link.symbolSet = symbolSet;
 
+	// create the required templates
 	try {
 		var classTemplate = new JSDOC.JsPlate(publish.conf.templatesDir+"class.tmpl");
@@ -27,15 +31,17 @@
 	}
 	catch(e) {
-		print(e.message);
+		print("Couldn't create the required templates: "+e);
 		quit();
 	}
 
-	// filters
+	// some ustility filters
 	function hasNoParent($) {return ($.memberOf == "")}
 	function isaFile($) {return ($.is("FILE"))}
 	function isaClass($) {return ($.is("CONSTRUCTOR") || $.isNamespace)}
 
+	// get an array version of the symbolset, useful for filtering
 	var symbols = symbolSet.toArray();
 
+	// create the hilited source code files
 	var files = JSDOC.opt.srcFiles;
  	for (var i = 0, l = files.length; i < l; i++) {
@@ -45,21 +51,45 @@
  	}
 
+ 	// get a list of all the classes in the symbolset
  	var classes = symbols.filter(isaClass).sort(makeSortby("alias"));
 
+	// create a filemap in which outfiles must be to be named uniquely, ignoring case
+	if (JSDOC.opt.u) {
+		var filemapCounts = {};
+		Link.filemap = {};
+		for (var i = 0, l = classes.length; i < l; i++) {
+			var lcAlias = classes[i].alias.toLowerCase();
+			
+			if (!filemapCounts[lcAlias]) filemapCounts[lcAlias] = 1;
+			else filemapCounts[lcAlias]++;
+			
+			Link.filemap[classes[i].alias] = 
+				(filemapCounts[lcAlias] > 1)?
+				lcAlias+"_"+filemapCounts[lcAlias] : lcAlias;
+		}
+	}
+	
+	// create a class index, displayed in the left-hand column of every class page
 	Link.base = "../";
  	publish.classesIndex = classesTemplate.process(classes); // kept in memory
 
+	// create each of the class pages
 	for (var i = 0, l = classes.length; i < l; i++) {
 		var symbol = classes[i];
+		
+		symbol.events = symbol.getEvents();   // 1 order matters
+		symbol.methods = symbol.getMethods(); // 2
+		
 		var output = "";
 		output = classTemplate.process(symbol);
 
-		IO.saveFile(publish.conf.outDir+"symbols/", symbol.alias+publish.conf.ext, output);
-	}
-
-	// regenrate the index with different relative links
+		IO.saveFile(publish.conf.outDir+"symbols/", ((JSDOC.opt.u)? Link.filemap[symbol.alias] : symbol.alias) + publish.conf.ext, output);
+	}
+
+	// regenerate the index with different relative links, used in the index pages
 	Link.base = "";
 	publish.classesIndex = classesTemplate.process(classes);
 
+	// create the class index page
 	try {
 		var classesindexTemplate = new JSDOC.JsPlate(publish.conf.templatesDir+"index.tmpl");
@@ -71,4 +101,5 @@
 	classesindexTemplate = classesIndex = classes = null;
 
+	// create the file index page
 	try {
 		var fileindexTemplate = new JSDOC.JsPlate(publish.conf.templatesDir+"allfiles.tmpl");
@@ -76,6 +107,6 @@
 	catch(e) { print(e.message); quit(); }
 
-	var documentedFiles = symbols.filter(isaFile);
-	var allFiles = [];
+	var documentedFiles = symbols.filter(isaFile); // files that have file-level docs
+	var allFiles = []; // not all files have file-level docs, but we need to list every one
 
 	for (var i = 0; i < files.length; i++) {
@@ -96,4 +127,5 @@
 	allFiles = allFiles.sort( ckeditor_sortFiles );
 
+	// output the file index page
 	var filesIndex = fileindexTemplate.process(allFiles);
 	IO.saveFile(publish.conf.outDir, "files"+publish.conf.ext, filesIndex);
@@ -102,5 +134,5 @@
 
 
-/** Just the first sentence. Should not break on dotted variable names. */
+/** Just the first sentence (up to a full stop). Should not break on dotted variable names. */
 function summarize(desc) {
 	if (typeof desc != "undefined")
@@ -108,5 +140,5 @@
 }
 
-/** make a symbol sorter by some attribute */
+/** Make a symbol sorter by some attribute. */
 function makeSortby(attribute) {
 	return function(a, b) {
@@ -121,4 +153,5 @@
 }
 
+/** Pull in the contents of an external file at the given path. */
 function include(path) {
 	var path = publish.conf.templatesDir+path;
@@ -126,4 +159,5 @@
 }
 
+/** Turn a raw source file into a code-hilited page in the docs. */
 function makeSrcFile(path, srcDir, name) {
 	if (JSDOC.opt.s) return;
@@ -145,4 +179,5 @@
 }
 
+/** Build output for displaying function parameters. */
 function makeSignature(params) {
 	if (!params) return "()";
Index: /CKEditor/trunk/_source/core/ckeditor_basic.js
===================================================================
--- /CKEditor/trunk/_source/core/ckeditor_basic.js	(revision 4903)
+++ /CKEditor/trunk/_source/core/ckeditor_basic.js	(revision 4904)
@@ -138,5 +138,5 @@
 		};
 
-		/**
+		/*
 		 * @ignore
 		 * Documented at ckeditor.js.
Index: /CKEditor/trunk/_source/core/dom/document.js
===================================================================
--- /CKEditor/trunk/_source/core/dom/document.js	(revision 4903)
+++ /CKEditor/trunk/_source/core/dom/document.js	(revision 4904)
@@ -169,5 +169,4 @@
 
 			return (
-			/** @ignore */
 			this.getHead = function()
 				{
@@ -188,5 +187,4 @@
 
 			return (
-			/** @ignore */
 			this.getBody = function()
 				{
@@ -195,4 +193,8 @@
 		},
 
+		/**
+		 * Gets the DOM document element for this document.
+		 * @returns {CKEDITOR.dom.element} The DOM document element.
+		 */
 		getDocumentElement : function()
 		{
@@ -200,5 +202,4 @@
 
 			return (
-			/** @ignore */
 			this.getDocumentElement = function()
 				{
@@ -210,5 +211,4 @@
 		 * Gets the window object that holds this document.
 		 * @returns {CKEDITOR.dom.window} The window object.
-		 * @example
 		 */
 		getWindow : function()
@@ -217,5 +217,4 @@
 
 			return (
-			/** @ignore */
 			this.getWindow = function()
 				{
Index: /CKEditor/trunk/_source/core/dom/domobject.js
===================================================================
--- /CKEditor/trunk/_source/core/dom/domobject.js	(revision 4903)
+++ /CKEditor/trunk/_source/core/dom/domobject.js	(revision 4904)
@@ -182,4 +182,7 @@
 	};
 
+	/**
+	 * @name CKEDITOR.dom.domObject.prototype.removeCustomData
+	 */
 	domObjectProto.removeCustomData = function( key )
 	{
@@ -194,4 +197,7 @@
 	};
 
+	/**
+	 * @name CKEDITOR.dom.domObject.prototype.getCustomData
+	 */
 	domObjectProto.getUniqueId = function()
 	{
Index: /CKEditor/trunk/_source/core/dom/element.js
===================================================================
--- /CKEditor/trunk/_source/core/dom/element.js	(revision 4903)
+++ /CKEditor/trunk/_source/core/dom/element.js	(revision 4904)
@@ -619,5 +619,4 @@
 
 			return (
-			/** @ignore */
 			this.getName = function()
 				{
Index: /CKEditor/trunk/_source/core/dom/node.js
===================================================================
--- /CKEditor/trunk/_source/core/dom/node.js	(revision 4903)
+++ /CKEditor/trunk/_source/core/dom/node.js	(revision 4904)
@@ -233,5 +233,4 @@
 
 			return (
-			/** @ignore */
 			this.getDocument = function()
 				{
Index: /CKEditor/trunk/_source/plugins/domiterator/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/domiterator/plugin.js	(revision 4903)
+++ /CKEditor/trunk/_source/plugins/domiterator/plugin.js	(revision 4904)
@@ -12,5 +12,7 @@
 (function()
 {
-
+	/**
+	 * @name CKEDITOR.dom.iterator
+	 */
 	function iterator( range )
 	{
