- summary: FitWindow : Stretch window to fullsize and back --> FitWindow : Stretch editor to fullsize and back
This plugin stretches the editor's frame to fit into
the current window or toggles back to its original
size. In fullsize mode, the editor will adapt to the
new window size on resize of it.
Technically, the plugins does this by positioning the
editor at the top left of the current page and then
scrolling to that position. The body's its scrollbars
are removed and is stripped from its CSS to be able to
set the editor fullscreen. When the user switched back
to standard size, the scrollbars and CSS are restored.
The editor is positioned back at its original position
and is resized back to its original size. The window
scrolls to its position. Either so that the editor
appears at the top of the viewPane or centered. This
can be configured.
The resize functionality also let the editor resize
when e.g. the searchbar of firefox switches off or just
when any browser modification is made that affects the
window size....
Tested in Firfox 1.5 and IE 6.0 on Windows and in
Firefox 1.0.7 on Linux
Written By Paul Moers, 2006
mail@saulmade.nl
With help from Christian Fecteau
webmaster@christianfecteau.com
Logged In: YES
user_id=1371356
Installation instructions :
-----------------------------
1. Copy the 'FitWindow' directory to the plugins directory
of the FCKeditor 'editor/plugins/'
2. Edit your fckconfig.js and add the next lines :
FCKConfig.Plugins.Add( 'FitWindow' ) ;
// --- config settings for the FitWindow plugin ---
// when toggling back to original size, scroll so
that the editor appears centered in the viewPane
FCKConfig.FitWindow_center = true;
// should the editor auto fit to the window when it
gets resized
FCKConfig.FitWindow_autoFitToResize = true;
3. Modify those configuration options you just pasted to
your likings.
4. Still in the fckconfig.js file, edit your toolbar and add
a button named FitWindow (e.g. ['About','-','FitWindow']).
This will be the button to stretch the editor to fit the
current window or toggle back to its original size.
5. start clicking :)
Logged In: YES
user_id=1371356
Change the toolbar icon :
---------------------------
It could be that you don't like the Fitwindow icon compared
to your other icons, e.g. when you use the default skin...
Then you can download a black and white icon to replace the
default FitWindow icon.
Two versions are available: 16x16 pixels and on with more
space around the image so that it becomes 21x21 pixels to
fit into the default skin.
The default icon can also be downloaded as a 21x21 pixels
version.
http://www.saulmade.nl/FCKeditor/files/FitWindow_blacknwhite_16x16.gif
http://www.saulmade.nl/FCKeditor/files/FitWindow_blacknwhite_21x21.gif
http://www.saulmade.nl/FCKeditor/files/FitWindow_color_21x21.gif
Logged In: YES
user_id=1371356
See Saulmade's page dedicated to this plugin :
http://www.saulmade.nl/FCKeditor/FCKPlugins.php
Logged In: YES
user_id=1301772
tested in firefox 1.5.0.1 on Linux
Logged In: YES
user_id=1371356
installation instruction correction :
The first line of the text that needs to be added to your
config file (installation step 2) needs to define the
language you want the plugin to have. Available are 'en'
for English and 'nl' for Dutch.
FCKConfig.Plugins.Add( 'FitWindow','en' ) ;
Logged In: YES
user_id=879516
Hi!
Really a great work! Two ideas for improvements:
1.
I do have problems to use the default language of my
fck-installation. Do you see any possibility to use the
default for Fitwindow, too? Now I have to use a hardcoded
language 'en'...
2.
It would be nicer to have two different fitwindow-icons -
one for the normal window and one for fullscreen window. So
everybody can see the right icon for getting the normal
smaller window again!
Thanks
Alex
Logged In: YES
user_id=1247922
Great job.
Logged In: YES
user_id=735961
There's a small bug, when you load this from a custom path
the icon doesn't show properly. The fix is to change line
282 from:
oFitWindowItem.IconPath = FCKConfig.PluginsPath .... ;
to
oFitWindowItem.IconPath = FCKPlugins.Items['FitWindow'].Path
Fantastic plugin :-)
Logged In: YES
user_id=1371356
Alexander (alex-z),
1. sorry, I don't know how to make the plugin use the
default language. I tried simply "FCKConfig.Plugins.Add(
'FitWindow', FCKConfig.DefaultLanguage )" but it didn't work...
2. I deliberately used an icon not indicating the state of
the editor, because I'm not sure how to modify the icon at
runtime (i.e. on size change)
Logged In: YES
user_id=1371356
Sadly another bug was reported:
When in fullscreen mode the tools like Style, Size, Text
Color etc. don't work anymore (no popup menu is displayed).
- This bug only appears in firefox, in IE the popups show up
correctly.
- The popups seem to be overlapped when the plugin places
the editor on z-index 9999999 in fullscreen mode. Decreasing
the z-index (line 102 in the plugin's 'fckplugin.js' file)
to lower than 10001 brings up the popup menus again, but
they are all on the left side of the window. Seemingly the
plugin breaks the relative positioning of the popups in
gecko browsers...
FitWindow : Stretch window to fullsize and back
Logged In: YES
user_id=1371356
FitWindow 2006-05-07 Update:
- Added Finnish language file.
- Decreased the Z-index the FCKeditor is placed on when in
fullsize mode to 9999 as a 'bugfix' to the bug described
below. With this z-index the popups will show, but they will
all appear on the left of your screen. To fix this you'll
have to delete your doctype declaration! Any doctype I've
tested causes the popups to misalign (HTML 4.01 Strict,
Transitional, Frameset; XHTML 1.0 Strict, Transitional,
Frameset; and XHTML 1.1 DTD) so you'll have to delete it.
Logged In: YES
user_id=572424
I'm implementing this feature in the core of FCKeditor,
with many changes and cleanups... resolved also the panel
positioning problem.
I'm sure all you will enjoy it. Thanks Paul.
Logged In: YES
user_id=620138
There is a problem with the feature when the editor is
placed in an position:absolute div box.
...
<style>
html,body,form {height:100%; width:100%}
</style>
...
<div style="position:absolute; left:20%; width:80%;>
<!--Text Editor Here -->
</div>
The text editors top left corner will stay in the div, and
it will expand from there,to the correct width and height,
it happens in both IE6 and Firefox 1.5.0.4.
I was thinking on moving the IFRAME object in the DOM
temporarily from where it is, to a direct decendant of a
body node.
Logged In: YES
user_id=1371356
I you're having problems with this plugin, please upgrade to
FCKeditor 2.3 which has the 'FitWindow' feature implemented
into it!
Logged In: YES
user_id=572424
AS this is a core feature now, I'm closing this plugin to
avoid confusion.
Log in to post a comment.