The Mozilla
Organization
Our Mission
Who We Are
Getting Involved
Community
Editorials
What's New
Development
Roadmap
Module Owners
Blue Sky
Projects
Status
Tools
Products
Source Code
Binaries
Documentation
License Terms
Bug Reports
Search
Feedback


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.

Problem/Requirements

  • Discontiguous selection
  • Table selection (inside tables)
  • Selection across tables (or including tables and non-tables)
  • Need API to be able to start, end, extend, add to current selection
  • Formats exported when the selection is cut/copied to the clipboard -- XIF? Straight html?
  • Platform issues: are there differences in clipboard formats?
    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.
  • What happens if the document changes out from under us while we have a selection?

Solutions

We will probably implement "current selection" with a list of iRange objects. (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 iRanges are still valid.

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.

Risks

May 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.

Dependencies

iRange 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 iRange code.
 

Black Holes


 



Copyright © 1998 The Mozilla Organization.