Index: _source/lang/en.js =================================================================== --- _source/lang/en.js (revision 3527) +++ _source/lang/en.js (working copy) @@ -647,5 +647,7 @@ copy : 'Copyright © $1. All rights reserved.' }, - maximize : 'Maximize' + maximize : 'Maximize', + + resize : 'Drag to resize' }; Index: _source/plugins/resize/plugin.js =================================================================== --- _source/plugins/resize/plugin.js (revision 0) +++ _source/plugins/resize/plugin.js (revision 0) @@ -0,0 +1,76 @@ +/* +Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +CKEDITOR.plugins.add( 'resize', +{ + init : function( editor ) + { + var config = editor.config; + + if ( config.resize_enabled ) + { + var container = null; + var origin, startSize; + + function dragHandler( evt ) + { + var dx = evt.data.$.screenX - origin.x; + var dy = evt.data.$.screenY - origin.y; + var internalWidth = startSize.width + dx * ( editor.lang.dir == 'rtl' ? -1 : 1 ); + var internalHeight = startSize.height + dy; + + editor.resize( Math.max( config.resize_minWidth, Math.min( internalWidth, config.resize_maxWidth ) ), + Math.max( config.resize_minHeight, Math.min( internalHeight, config.resize_maxHeight ) ) ); + } + + function dragEndHandler ( evt ) + { + CKEDITOR.document.removeListener( 'mousemove', dragHandler ); + CKEDITOR.document.removeListener( 'mouseup', dragEndHandler ); + + if ( editor.document ) + { + editor.document.removeListener( 'mousemove', dragHandler ); + editor.document.removeListener( 'mouseup', dragEndHandler ); + } + } + + var mouseDownFn = CKEDITOR.tools.addFunction( function( $event ) + { + if ( container == null ) + container = editor.getResizable(); + + startSize = { width : container.$.offsetWidth || 0, height : container.$.offsetHeight || 0 }; + origin = { x : $event.screenX, y : $event.screenY }; + + CKEDITOR.document.on( 'mousemove', dragHandler ); + CKEDITOR.document.on( 'mouseup', dragEndHandler ); + + if ( editor.document ) + { + editor.document.on( 'mousemove', dragHandler ); + editor.document.on( 'mouseup', dragEndHandler ); + } + } ); + + editor.on( 'themeSpace', function( event ) + { + if ( event.data.space == 'bottom' ) + { + event.data.html += '
'; + } + }, editor, null, 100 ); + } + } +} ); + +CKEDITOR.config.resize_minWidth = 750; +CKEDITOR.config.resize_minHeight = 250; +CKEDITOR.config.resize_maxWidth = 3000; +CKEDITOR.config.resize_maxHeight = 3000; +CKEDITOR.config.resize_enabled = true; Index: _source/themes/default/theme.js =================================================================== --- _source/themes/default/theme.js (revision 3527) +++ _source/themes/default/theme.js (working copy) @@ -179,15 +179,26 @@ var outer = contents.getAscendant( 'table' ); // Resize the width first. + // WEBKIT BUG: Webkit requires that we put the editor off from display when we + // resize it. If we don't, the browser crashes! + CKEDITOR.env.webkit && outer.setStyle( 'display', 'none' ); outer.setStyle( 'width', width ); + if ( CKEDITOR.env.webkit ) + { + outer.$.offsetWidth; + outer.setStyle( 'display', '' ); + } // Get the height delta between the outer table and the content area. // If we're setting the content area's height, then we don't need the delta. var delta = isContentHeight ? 0 : ( outer.$.offsetHeight || 0 ) - ( contents.$.clientHeight || 0 ); + contents.setStyle( 'height', Math.max( height - delta, 0 ) + 'px' ); - // Resize the height. - contents.setStyle( 'height', ( height - delta ) + 'px' ); - // Emit a resize event. this.fire( 'resize' ); }; + +CKEDITOR.editor.prototype.getResizable = function() +{ + return this.container.getChild( [ 0, 0 ] ); +}; Index: _source/skins/office2003/elementspath.css =================================================================== --- _source/skins/office2003/elementspath.css (revision 3527) +++ _source/skins/office2003/elementspath.css (working copy) @@ -14,8 +14,15 @@ .cke_skin_office2003 .cke_path { padding: 3px 3px 0 3px; + display: block; + float: left; } +.cke_skin_office2003 .cke_rtl .cke_path +{ + float: right; +} + .cke_skin_office2003 .cke_path a, .cke_skin_office2003 .cke_path .cke_empty { @@ -36,7 +43,7 @@ } .cke_skin_office2003 .cke_rtl .cke_path a, -.cke_skin_office2003 .cke_path .cke_empty +.cke_skin_office2003 .cke_rtl .cke_path .cke_empty { float: right; } Index: _source/skins/office2003/images/resizer.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: _source/skins/office2003/images/resizer.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Index: _source/skins/office2003/images/resizer_rtl.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: _source/skins/office2003/images/resizer_rtl.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Index: _source/skins/office2003/mainui.css =================================================================== --- _source/skins/office2003/mainui.css (revision 3527) +++ _source/skins/office2003/mainui.css (working copy) @@ -54,3 +54,21 @@ white-space: pre; background-color: #fff; } + +.cke_skin_office2003 .cke_resizer +{ + width: 12px; + height: 12px; + margin-top: 12px; + display: block; + float: right; + background-image: url(images/resizer.gif); + cursor: se-resize; +} + +.cke_skin_office2003 .cke_rtl .cke_resizer +{ + cursor: sw-resize; + background-image: url(images/resizer_rtl.gif); + float: left; +} Index: _source/skins/v2/elementspath.css =================================================================== --- _source/skins/v2/elementspath.css (revision 3527) +++ _source/skins/v2/elementspath.css (working copy) @@ -14,8 +14,15 @@ .cke_skin_v2 .cke_path { padding: 3px 3px 0 3px; + display: block; + float: left; } +.cke_skin_v2 .cke_rtl .cke_path +{ + float: right; +} + .cke_skin_v2 .cke_path a, .cke_skin_v2 .cke_path .cke_empty { @@ -36,7 +43,7 @@ } .cke_skin_v2 .cke_rtl .cke_path a, -.cke_skin_v2 .cke_path .cke_empty +.cke_skin_v2 .cke_rtl .cke_path .cke_empty { float: right; } Index: _source/skins/v2/images/resizer.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: _source/skins/v2/images/resizer.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Index: _source/skins/v2/images/resizer_rtl.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: _source/skins/v2/images/resizer_rtl.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Index: _source/skins/v2/mainui.css =================================================================== --- _source/skins/v2/mainui.css (revision 3527) +++ _source/skins/v2/mainui.css (working copy) @@ -65,3 +65,21 @@ /* For IE6+Quirks only */ _white-space: normal; } + +.cke_skin_v2 .cke_resizer +{ + width: 12px; + height: 12px; + margin-top: 12px; + display: block; + float: right; + background-image: url(images/resizer.gif); + cursor: se-resize; +} + +.cke_skin_v2 .cke_rtl .cke_resizer +{ + cursor: sw-resize; + background-image: url(images/resizer_rtl.gif); + float: left; +} Index: _source/core/config.js =================================================================== --- _source/core/config.js (revision 3527) +++ _source/core/config.js (working copy) @@ -150,7 +150,7 @@ * config.plugins = 'basicstyles,button,htmldataprocessor,toolbar,wysiwygarea'; */ - plugins : 'about,basicstyles,blockquote,button,clipboard,colorbutton,contextmenu,elementspath,enterkey,entities,find,flash,font,format,forms,horizontalrule,htmldataprocessor,image,indent,justify,keystrokes,link,list,maximize,newpage,pagebreak,pastefromword,pastetext,preview,print,removeformat,save,scayt,smiley,showblocks,sourcearea,stylescombo,table,tabletools,specialchar,tab,templates,toolbar,undo,wysiwygarea,wsc', + plugins : 'about,basicstyles,blockquote,button,clipboard,colorbutton,contextmenu,elementspath,enterkey,entities,find,flash,font,format,forms,horizontalrule,htmldataprocessor,image,indent,justify,keystrokes,link,list,maximize,newpage,pagebreak,pastefromword,pastetext,preview,print,removeformat,resize,save,scayt,smiley,showblocks,sourcearea,stylescombo,table,tabletools,specialchar,tab,templates,toolbar,undo,wysiwygarea,wsc', /** * List of additional plugins to be loaded. This is a tool setting which