Custom floating panel files are HTML files that reside in the Configuration/Floaters folder inside the application folder. The body section of a floating panel file contains an HTML form. Event handlers that are attached to form elements can call JavaScript code that performs arbitrary edits to the current document.

Dreamweaver has several built-in floating panels that are accessible from the Window menu. (These built-in panels are part of the core Dreamweaver code and do not have corresponding floating panel files for them in the Configuration/Floaters folder.)

Custom floating panels can be moved, resized, and tabbed together the same way as the floating panels that are built into Dreamweaver. Custom floating panels differ from built-in floating panels in the following ways:

  • Custom floating panels display in the default gray. Setting the bgcolor attribute in the body tag has no effect.

  • All custom floating panels either appear in front of the Document window or float behind it when inactive. Where the floating panels appear depends on the setting for All Other Floaters in the Panels preferences.

Floating panel files also differ somewhat from other extensions. Unlike other extension files, Dreamweaver does not load floating panel files into memory at startup unless the floating panels were visible when Dreamweaver last shut down. If the floating panels are not visible when Dreamweaver shut down, reference from one of the following functions to load the files that define the panels.

  • dreamweaver.getFloaterVisibility()

  • dreamweaver.setFloaterVisibility()

  • dreamweaver.toggleFloater()

For more information on these functions, see the Dreamweaver API Reference.

When one of the files inside the Configuration folder calls the dw.getFloaterVisibility(floaterName), dw.setFloaterVisibility(floaterName), or dw.toggleFloater(floaterName) functions, the following events occur:

  1. If floaterName is not one of the reserved floating panel names, Dreamweaver searches the Configuration/Floaters folder for a file called floaterName.htm. (For a complete list of reserved floating panel names, see the dreamweaver.getFloaterVisibility() function in the Dreamweaver API Reference. If floaterName.htm is not found, Dreamweaver searches for floaterName.html. If no file is found, nothing happens.

  2. When the floating panel file is loaded for the first time, the initialPosition() function is called, if it is defined, to determine the default position of the floating panel on the screen. In the same manner, the initialTabs() function is called, if it is defined, to determine the default tab grouping of the floating panel.

  3. The selectionChanged() and documentEdited() functions are called on the assumption that changes probably occurred while the floating panel was hidden.

  4. When the floating panel is visible, the following actions occur:

    • When the selection changes, the selectionChanged() function is called, if it is defined.

    • When the user changes the document, the documentEdited() function is called, if it is defined.

    • Event handlers that are attached to the fields in the floating panel interface execute as the user encounters them. (For example, a button with an onClick event handler that executes dw.getDocumentDOM().body.innerHTML='' removes everything between the opening and closing body tags in the document when it is clicked.)

      Floating panels support two special events on the body tag: onShow() and onHide().

  5. When the user quits Dreamweaver, the current visibility, position, and tab grouping of the floating panel are saved. The next time Dreamweaver starts up, it loads the floating panel files for any floating panels that were visible at the last shutdown. Then Dreamweaver displays the floating panels in their last position and tab grouping.

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy