![]() |
|
|
Selection for the Editor in NGLayout
This document describes the preliminary engineering spec for implementing selection, as needed by the editor, in the new NGlayout world, and as implemented by the Editor team. Problem/Requirements
Unix should make the selection available for paste without needing an explicit cut (deficiency in the old Composer), like xterm and most other X apps. SolutionsWe will probably implement "current selection" with a list of nsIRange objects (see dom/public/coreDOM/nsIDOMRange.h for the source, or see the W3C proposal). [Who will own the current selection?] If the document changes (e.g. by a plugin), clear the selection since we don't know whether the nsIRanges are still valid. [The latest iRange spec says that Ranges must be able to change to reflect changes in the DOM. However, we may not have time to implement this for the first pass of Selection code.]Format advertised to the clipboard will probably be html at least initially, with an option for offering XIF later if there is extra-html information which could be usefully pasted. RisksMay not be enough time to implement selection early enough. It must be written fairly early in the process; if it's subject to a lot of last-minute hacks, it's even more at risk than other areas of becoming a shoddy mass of unmaintainable code.DependenciesRange needs to be fairly solid before much progress can be made on selection. This means that we'll probably have to write at least the first pass of the Range code.We are also dependent on the front end and layout code responsible for
mapping mouse or cursor position to DOM Node.
Black HolesNone known.Tue Dec 8 1998 akkana@netscape.com
|
|||||||
| Copyright © 1998 The Mozilla Organization. | ||||||||