# Yahoo! UI Library

### editor 2.6.0

Yahoo! UI Library > editor > YAHOO.widget.EditorWindow

Show Private Show Protected Show Deprecated

## Class YAHOO.widget.EditorWindow

Class to hold Window information between uses. We use the same panel to show the windows, so using this will allow you to configure a window before it is shown. This is what you pass to Editor.openWindow();. These parameters will not take effect until the openWindow() is called in the editor.

### Properties

#### attrs `- private object`

The window attributes

#### body `- private object`

Holder for the body of the window, used in Editor.openWindow

#### footer `- private object`

Holder for the footer of the window, used in Editor.openWindow

#### header `- private object`

Holder for the header of the window, used in Editor.openWindow

#### name `- private object`

A unique name for the window

### Methods

#### setBody

`void setBody ( str )`
Sets the body for the window.

Parameters:
  `str <String/HTMLElement>` The string or DOM reference to be used as the windows body.

Returns: `void`

#### setFooter

`void setFooter ( str )`
Sets the footer for the window.

Parameters:
  `str <String/HTMLElement>` The string or DOM reference to be used as the windows footer.

Returns: `void`

#### setHeader

`void setHeader ( str )`
Sets the header for the window.

Parameters:
  `str <String/HTMLElement>` The string or DOM reference to be used as the windows header.

Returns: `void`

#### toString

`String toString ( )`
Returns a string representing the EditorWindow.

Returns: `String`

### Events

#### afterOpenWindow

`afterOpenWindow ( win , panel )`
Event fires after an Editor Window is opened. See Element.addListener for more information on listening for this event.

Parameters:
  `win <EditorWindow>` The EditorWindow object
  `panel <Overlay>` The Overlay object that is used to create the window.

#### beforeOpenWindow

`beforeOpenWindow ( win , panel )`
Event fires before an Editor Window is opened. See Element.addListener for more information on listening for this event.

Parameters:
  `win <EditorWindow>` The EditorWindow object
  `panel <Overlay>` The Overlay object that is used to create the window.

#### closeWindow

`closeWindow ( win )`
Event fires after an Editor Window is closed. See Element.addListener for more information on listening for this event.

Parameters:
  `win <EditorWindow>` The EditorWindow object

#### windowCMDClose

`windowCMDClose ( win , panel )`
Dynamic event fired when an EditorWindow is closed.. The dynamic event is based on the name of the window. Example Window: createlink, opening this window would fire the windowcreatelinkClose event. See Element.addListener for more information on listening for this event.

Parameters:
  `win <EditorWindow>` The EditorWindow object
  `panel <Overlay>` The Overlay object that is used to create the window.

#### windowCMDOpen

`windowCMDOpen ( win , panel )`
Dynamic event fired when an EditorWindow is opened.. The dynamic event is based on the name of the window. Example Window: createlink, opening this window would fire the windowcreatelinkOpen event. See Element.addListener for more information on listening for this event.

Parameters:
  `win <EditorWindow>` The EditorWindow object
  `panel <Overlay>` The Overlay object that is used to create the window.

#### windowCreateLinkRender

`windowCreateLinkRender ( panel , body )`
Event fired when the pre render of the Create Link window has finished.

Parameters:
  `panel <Overlay>` The Overlay object that is used to create the window.
  `body <HTMLElement>` The HTML element used as the body of the window..

#### windowInsertImageRender

`windowInsertImageRender ( panel , body , toolbar )`
Event fired when the pre render of the Insert Image window has finished.

Parameters:
  `panel <Overlay>` The Overlay object that is used to create the window.
  `body <HTMLElement>` The HTML element used as the body of the window..
  `toolbar <Toolbar>` A reference to the toolbar object used inside this window.

#### windowRender

`windowRender ( win , panel )`
Event fired when the initial Overlay is rendered. Can be used to manipulate the content of the panel.

Parameters:
  `win <EditorWindow>` The EditorWindow object
  `panel <Overlay>` The Overlay object that is used to create the window.

Copyright © 2008 Yahoo! Inc. All rights reserved.