Index: /CKEditor/trunk/_source/lang/en.js
===================================================================
--- /CKEditor/trunk/_source/lang/en.js	(revision 2999)
+++ /CKEditor/trunk/_source/lang/en.js	(revision 3000)
@@ -358,4 +358,10 @@
 	},
 
+	smiley :
+	{
+		toolbar	: 'Smiley',
+		title	: 'Insert a Smiley'
+	},
+
 	elementsPath :
 	{
Index: /CKEditor/trunk/_source/plugins/dialog/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/dialog/plugin.js	(revision 2999)
+++ /CKEditor/trunk/_source/plugins/dialog/plugin.js	(revision 3000)
@@ -1,3 +1,3 @@
-/*
+﻿/*
 Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
@@ -67,5 +67,5 @@
 		// Fire the "dialogDefinition" event, making it possible to customize
 		// the dialog definition.
-		definition = CKEDITOR.fire( 'dialogDefinition',
+		this.definition = definition = CKEDITOR.fire( 'dialogDefinition',
 			{
 				name : dialogName,
@@ -82,5 +82,4 @@
 			element : themeBuilt.element,
 			name : dialogName,
-			definition : definition,
 			size : { width : 0, height : 0 },
 			contents : {},
@@ -413,5 +412,5 @@
 			// Insert the dialog's element to the root document.
 			var element = this._.element;
-			var definition = this._.definition;
+			var definition = this.definition;
 			if ( !( element.getParent() && element.getParent().equals( CKEDITOR.document.getBody() ) ) )
 				element.appendTo( CKEDITOR.document.getBody() );
@@ -427,5 +426,5 @@
 
 			// Select the first tab by default.
-			this.selectPage( this._.definition.contents[0].id );
+			this.selectPage( this.definition.contents[0].id );
 
 			// Reset all inputs back to their default value.
@@ -1319,5 +1318,5 @@
 	var initResizeHandles = function( dialog )
 	{
-		var definition = dialog._.definition,
+		var definition = dialog.definition,
 			minWidth = definition.minWidth || 0,
 			minHeight = definition.minHeight || 0,
Index: /CKEditor/trunk/_source/plugins/smiley/dialogs/smiley.js
===================================================================
--- /CKEditor/trunk/_source/plugins/smiley/dialogs/smiley.js	(revision 2999)
+++ /CKEditor/trunk/_source/plugins/smiley/dialogs/smiley.js	(revision 3000)
@@ -1,3 +1,3 @@
-/*
+﻿/*
 Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
@@ -80,6 +80,6 @@
 	return {
 		title : editor.lang.smiley.title,
-		minWidth : config.windowWidth,
-		minHeight : config.windowHeight,
+		minWidth : 320,
+		minHeight : 210,
 		contents : [
 			{
Index: /CKEditor/trunk/_source/plugins/smiley/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/smiley/plugin.js	(revision 2999)
+++ /CKEditor/trunk/_source/plugins/smiley/plugin.js	(revision 3000)
@@ -6,4 +6,6 @@
 CKEDITOR.plugins.add( 'smiley',
 {
+	requires : [ 'dialog' ],
+
 	init : function( editor, pluginPath )
 	{
@@ -15,29 +17,18 @@
 			});
 		CKEDITOR.dialog.add( 'smiley', this.path + 'dialogs/smiley.js' );
-	},
-
-	lang : [ 'en' ]
+	}
 } );
 
 CKEDITOR.config.smiley =
 {
-	// TODO: update descriptions, fix coding style.
-	/**
-	 * List of smiley images displayed in the Smiley dialog.
-	 * @type Array
-	 * @default ['regular_smile.gif','sad_smile.gif','wink_smile.gif','teeth_smile.gif','confused_smile.gif','tounge_smile.gif','embaressed_smile.gif','omg_smile.gif','whatchutalkingabout_smile.gif','angry_smile.gif','angel_smile.gif','shades_smile.gif','devil_smile.gif','cry_smile.gif','lightbulb.gif','thumbs_down.gif','thumbs_up.gif','heart.gif','broken_heart.gif','kiss.gif','envelope.gif']
-	 * @example
-	 * config.smileyImages = [ 'tounge.gif', 'smile.gif', 'laugh.gif' ];
-	 */
+	path : CKEDITOR.basePath +  '_source/plugins/smiley/images/',
+
 	images : [ 'regular_smile.gif','sad_smile.gif','wink_smile.gif','teeth_smile.gif','confused_smile.gif','tounge_smile.gif',
 	'embaressed_smile.gif','omg_smile.gif','whatchutalkingabout_smile.gif','angry_smile.gif','angel_smile.gif','shades_smile.gif',
 	'devil_smile.gif','cry_smile.gif','lightbulb.gif','thumbs_down.gif','thumbs_up.gif','heart.gif',
 	'broken_heart.gif','kiss.gif','envelope.gif'],
+
 	descriptions : [ ':)', ':(', ';)', ':D', ':/', ':P', '', '', '', '', '', '', '', ';(', '', '', '', '', ':kiss', '', ],
 
-	//TODO: update path
-	path : CKEDITOR.basePath +  '_source/plugins/smiley/images/',
-	windowWidth : 320,
-	windowHeight : 210,
 	columns : 8
 };
Index: /CKEditor/trunk/_source/plugins/specialchar/dialogs/specialchar.js
===================================================================
--- /CKEditor/trunk/_source/plugins/specialchar/dialogs/specialchar.js	(revision 3000)
+++ /CKEditor/trunk/_source/plugins/specialchar/dialogs/specialchar.js	(revision 3000)
@@ -0,0 +1,181 @@
+/*
+Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.dialog.add( 'specialchar', function( editor )
+{
+	return {
+		title : editor.lang.specialChar.title,
+		minWidth : 450,
+		minHeight : 350,
+		buttons : [ CKEDITOR.dialog.cancelButton ],
+		charColumns : 17,
+		chars :
+			[
+				'!','&quot;','#','$','%','&amp;',"'",'(',')','*','+','-','.','/',
+				'0','1','2','3','4','5','6','7','8','9',':',';',
+				'&lt;','=','&gt;','?','@',
+				'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O',
+				'P','Q','R','S','T','U','V','W','X','Y','Z',
+				'[',']','^','_','`',
+				'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p',
+				'q','r','s','t','u','v','w','x','y','z',
+				'{','|','}','~','&euro;','&lsquo;','&rsquo;','&rsquo;','&ldquo;',
+				'&rdquo;','&ndash;','&mdash;','&iexcl;','&cent;','&pound;',
+				'&curren;','&yen;','&brvbar;','&sect;','&uml;','&copy;','&ordf;',
+				'&laquo;','&not;','&reg;','&macr;','&deg;','&plusmn;','&sup2;',
+				'&sup3;','&acute;','&micro;','&para;','&middot;','&cedil;',
+				'&sup1;','&ordm;','&raquo;','&frac14;','&frac12;','&frac34;',
+				'&iquest;','&Agrave;','&Aacute;','&Acirc;','&Atilde;','&Auml;',
+				'&Aring;','&AElig;','&Ccedil;','&Egrave;','&Eacute;','&Ecirc;',
+				'&Euml;','&Igrave;','&Iacute;','&Icirc;','&Iuml;','&ETH;',
+				'&Ntilde;','&Ograve;','&Oacute;','&Ocirc;','&Otilde;','&Ouml;',
+				'&times;','&Oslash;','&Ugrave;','&Uacute;','&Ucirc;','&Uuml;',
+				'&Yacute;','&THORN;','&szlig;','&agrave;','&aacute;','&acirc;',
+				'&atilde;','&auml;','&aring;','&aelig;','&ccedil;','&egrave;',
+				'&eacute;','&ecirc;','&euml;','&igrave;','&iacute;','&icirc;',
+				'&iuml;','&eth;','&ntilde;','&ograve;','&oacute;','&ocirc;',
+				'&otilde;','&ouml;','&divide;','&oslash;','&ugrave;','&uacute;',
+				'&ucirc;','&uuml;','&uuml;','&yacute;','&thorn;','&yuml;',
+				'&OElig;','&oelig;','&#372;','&#374','&#373','&#375;','&sbquo;',
+				'&#8219;','&bdquo;','&hellip;','&trade;','&#9658;','&bull;',
+				'&rarr;','&rArr;','&hArr;','&diams;','&asymp;'
+			],
+		onLoad :  function()
+		{
+			var columns = this.definition.charColumns,
+				chars = this.definition.chars;
+		
+			var html = [ '<table style="width: 320px; height: 100%; border-collapse: separate;" align="center" cellspacing="2" cellpadding="2" border="0">' ];
+
+			var i = 0 ;
+			while ( i < chars.length )
+			{
+				html.push( '<tr>' ) ;
+				
+				for( var j = 0 ; j < columns ; j++, i++ )
+				{
+					if ( chars[ i ] )
+					{
+						html.push( 
+							'<td width="1%"' +
+							' title="', chars[i].replace( /&/g, '&amp;' ), '"' +
+							' value="', chars[i].replace( /&/g, "&amp;" ), '"' +
+							' class="DarkBackground Hand">');
+						html.push( chars[i] );
+					}
+					else
+						html.push( '<td class="DarkBackground">&nbsp;' );
+					
+					html.push( '</td>' );
+				}
+				html.push( '</tr>' );
+			}
+
+			html.push( '</tbody></table>' );
+
+			this.getContentElement( 'info', 'charContainer' ).getElement().setHtml( html.join( '' ) );
+		},
+		contents : [
+			{
+				id : 'info',
+				label : editor.lang.common.generalTab,
+				title : editor.lang.common.generalTab,
+				elements : [
+					{
+						type : 'hbox',
+						align : 'top',
+						widths : [ '300px', '90px' ],
+						children :
+						[
+							{
+								type : 'hbox',
+								align : 'top',
+								padding : 0,
+								widths : [ '350px' ],
+								children :
+								[
+									{
+										type : 'html',
+										id : 'charContainer',
+										html : '',
+										onMouseover : function( evt )
+										{
+											var target = evt.data.getTarget(),
+												targetName = target.getName(),
+												value;
+
+											if ( targetName == 'td' && ( value = target.getAttribute( 'value' ) ) )
+											{
+												var dialog = this.getDialog(),
+													preview = dialog.getContentElement( 'info', 'charPreview' ).getElement(),
+													htmlPreview = dialog.getContentElement( 'info', 'htmlPreview' ).getElement();
+
+												preview.setHtml( value );
+												htmlPreview.setHtml( CKEDITOR.tools.htmlEncode( value ) );
+												target.addClass( "LightBackground" );
+											}
+										},
+										onMouseout : function( evt )
+										{
+											var dialog = this.getDialog();
+											var preview = dialog.getContentElement( 'info', 'charPreview' ).getElement();
+											var htmlPreview = dialog.getContentElement( 'info', 'htmlPreview' ).getElement();
+											var target = evt.data.getTarget();
+											var targetName = target.getName();
+											preview.setHtml( '&nbsp;' );
+											htmlPreview.setHtml( '&nbsp;' );
+
+											if ( targetName == 'td' )
+												target.removeClass( "LightBackground" );
+										},
+										onClick : function( evt )
+										{
+											var target = evt.data.getTarget();
+											var targetName = target.getName();
+											var editor = this.getDialog().getParentEditor();
+											if ( targetName == 'td' )
+											{
+												target = target.$;
+												if ( value = target.getAttribute( 'value' ) )
+												{
+													this.getDialog().restoreSelection();
+													editor.insertHtml( value );
+													this.getDialog().hide();
+												}
+											}
+										}
+									}
+								]
+							},
+							{
+								type : 'vbox',
+								align : 'top',
+								children :
+								[
+									{
+										type : 'html',
+										html : '<div></div>'
+									},
+									{
+										type : 'html',
+										id : 'charPreview',
+										style : 'border:1px solid #eeeeee;background-color:#EAEAD1;font-size:28px;height:40px;padding-top:9px;font-family:\'Microsoft Sans Serif\',Arial,Helvetica,Verdana;text-align:center;',
+										html : '<div>&nbsp;</div>'
+									},
+									{
+										type : 'html',
+										id : 'htmlPreview',
+										style : 'border:1px solid #eeeeee;background-color:#EAEAD1;font-size:14px;height:20px;padding-top:2px;font-family:\'Microsoft Sans Serif\',Arial,Helvetica,Verdana;text-align:center;',
+										html : '<div>&nbsp;</div>'
+									}
+								]
+							}
+						]
+					}
+				]
+			}
+		]
+	};
+} );
Index: /CKEditor/trunk/_source/plugins/specialchar/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/specialchar/plugin.js	(revision 3000)
+++ /CKEditor/trunk/_source/plugins/specialchar/plugin.js	(revision 3000)
@@ -0,0 +1,29 @@
+﻿/*
+Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+/**
+ * @file Special Character plugin
+ */
+
+CKEDITOR.plugins.add( 'specialchar',
+{
+	init : function( editor, pluginPath )
+	{
+		var pluginName = 'specialchar';
+	
+		// Register the dialog.
+		CKEDITOR.dialog.add( pluginName, this.path + 'dialogs/specialchar.js' );
+
+		// Register the command.
+		editor.addCommand( pluginName, new CKEDITOR.dialogCommand( pluginName ) );
+		
+		// Register the toolbar button.
+		editor.ui.addButton( 'SpecialChar',
+			{
+				label : editor.lang.specialChar.toolbar,
+				command : pluginName
+			});
+	}
+} );
Index: /CKEditor/trunk/ckeditor.pack
===================================================================
--- /CKEditor/trunk/ckeditor.pack	(revision 2999)
+++ /CKEditor/trunk/ckeditor.pack	(revision 3000)
@@ -46,5 +46,11 @@
 		'CKEDITOR.SELECTION_NONE' : 1,
 		'CKEDITOR.SELECTION_TEXT' : 2,
-		'CKEDITOR.SELECTION_ELEMENT' : 3
+		'CKEDITOR.SELECTION_ELEMENT' : 3,
+		'CKEDITOR.DIALOG_RESIZE_NONE' : 0,
+		'CKEDITOR.DIALOG_RESIZE_WIDTH' : 1,
+		'CKEDITOR.DIALOG_RESIZE_HEIGHT' : 2,
+		'CKEDITOR.DIALOG_RESIZE_BOTH' : 3,
+		'CKEDITOR.VALIDATE_OR' : 1,
+		'CKEDITOR.VALIDATE_AND' : 2
 	},
 
@@ -113,8 +119,12 @@
 					'_source/plugins/editingblock/plugin.js',
 					'_source/plugins/elementspath/plugin.js',
+					'_source/plugins/horizontalrule/plugin.js',
 					'_source/plugins/htmldataprocessor/plugin.js',
 					'_source/plugins/keystrokes/plugin.js',
+					'_source/plugins/newpage/plugin.js',
 					'_source/plugins/removeformat/plugin.js',
+					'_source/plugins/smiley/plugin.js',
 					'_source/plugins/sourcearea/plugin.js',
+					'_source/plugins/specialchar/plugin.js',
 					'_source/plugins/tab/plugin.js',
 					'_source/plugins/toolbar/plugin.js',
@@ -123,4 +133,6 @@
 					'_source/plugins/selection/plugin.js',
 					'_source/plugins/htmlwriter/plugin.js',
+					'_source/plugins/dialog/plugin.js',
+					'_source/plugins/dialogui/plugin.js',
 					'_source/skins/default/skin.js',
 					'_source/themes/default/theme.js'
Index: /CKEditor/trunk/config.js
===================================================================
--- /CKEditor/trunk/config.js	(revision 2999)
+++ /CKEditor/trunk/config.js	(revision 3000)
@@ -8,5 +8,5 @@
 	// This is a temporary setting we'll have while moving plugins from the
 	// prototype to trunk.
-	config.plugins = 'basicstyles,button,editingblock,elementspath,htmldataprocessor,keystrokes,removeformat,sourcearea,tab,toolbar,wysiwygarea';
+	config.plugins = 'basicstyles,button,editingblock,elementspath,horizontalrule,htmldataprocessor,keystrokes,newpage,removeformat,smiley,sourcearea,specialchar,tab,toolbar,wysiwygarea';
 
 	// Define changes to default configuration here. For example:
