Editing With Layout; Layout View And The Layout Objects - Adobe GoLive CS2 Programmer's Manual

Hide thumbs Also See for GoLive CS2:
Table of Contents

Advertisement

8

Editing with Layout

This chapter describes how to use the layout objects to work with a document's contents
programmatically while Layout view is open. The box , layout , and textArea objects provide methods
that minimize the necessity for reparsing and display your changes in the Layout view with a minimum of
delay and refresh flicker.

Layout View and the Layout Objects

By default (depending on the user's settings), GoLive displays markup documents in Layout view, shown in
the following figure. Layout view is a graphical editing window in which the user edits a document
visually, as it will look in a browser. As the user interacts with this view and its Inspector palettes, GoLive
changes the document's source code representation and its markup tree accordingly.
Graphical
representation
of <myTag>
element in
Layout view
Source for
jsxpaletteentry
element
Whenever GoLive displays the document in Layout view, it creates a set of JavaScript objects to manage
the visual representation of the content. These can be either
object for a displayed element corresponds to a markup object that represents the same markup source
code. The markup and layout objects work in concert; if an element has both a markup and a layout object,
and you modify it using one of the objects, the other is automatically updated.
If you make a structural change to the markup tree that affects the graphical display, GoLive reparses the
document—that is, it regenerates both the markup and layout objects. Reparsing can be time-consuming,
and any references you have to JavaScript objects become invalid.
The
custom HTML element in Layout view
<mytag>
jsxpaletteentry element in Inspector
layout Objects
or
box
Objects. The layout
108

Advertisement

Table of Contents
loading

Table of Contents