embedding: Need to design/ implement Editor Embedding APIs




18 years ago
16 years ago


(Reporter: travis, Assigned: mjudge)


({embed, topembed-})

embed, topembed-
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)


(Whiteboard: [nsbeta2-][nsbeta3-],DIGBug)



18 years ago
Need to implement embedding APIs for editor.


18 years ago
Blocks: 35556

Comment 1

18 years ago
Sorry for the spam, changing QA contact.
QA Contact: paulmac → jrgm

Comment 2

18 years ago
Assignee: travis → sfraser

Comment 3

18 years ago
setting to m18 for now
Target Milestone: --- → M18

Comment 4

18 years ago
nom. doug should you get this?
Keywords: nsbeta2

Comment 5

18 years ago
Here's what needs to happen, I think, to make editor more embeddable in 
XUL applications.

The editor functionality is exposed through various non-xpidl 
interfaces in mozilla/editor/public (e.g. nsIEditor, nsIHTMLEditor 
etc). Interaction with JavaScript happens via nsIEditorShell, which 
acts as a fairly thin shell around the editor, and is exposed via 
xpidl. (The editor shell is really just a heavily mutated appcore from 
the old days.) It is the responsibility of the editor shell to observe 
URL loads on the iframe that is editable, and to instantiate the editor 
when the OnEndDocumentLoad notification is received.

The editor shell can be created in two ways. The 'old' way is to have an 
<iframe> in the XUL, and some JavaScript that does a CreateInstance of
the nsEditorShell. The JS then tells the editorShell what iframe to
observe by setting editorShell.contentWindow, before a call to loadURL.

The new way is to use the new <editor> tag which is specified via XBL.
This instantiates an nsEditorBoxObject in layout code, which itself
creates the editorShell, and owns it.

In both cases, a ton of support code in JavaScript is necessary to
set up the editorShell, hook up the editorShell to the UI, and cause the 
URL load whose end causes the editor to get instantiated. This code 
lives in mozilla/editor/ui/composer/content/editor.js, much of it in 

An unfortunate feature of much of this JS support code is that it 
assumes that there is only one editorShell in the window, and so limits 
you to having just one editable <iframe> in a window. This definately 
needs to change. A related problem is that, because of this restriction, 
we cannot edit all frames of a frameset at the same time, nor can we 
deal with embedded <iframe>s in the document being edited.

To solve these problems, the editor needs to live off a container at the 
docShell level; we need either nsIEditableDocShell, or calls on 
nsIDocShell to get/set an editorShell. You should also bear in mind that 
we might want some kind of editor at the nsIDocShellTreeOwner level, to 
allow for the editing of framesets.

We also need the editor to be much more pluggable, so that simply 
putting in an <editor> tag in your XUL causes all the editorShell 
creation/url loading/editor instantiation to happen automagically. This 
means moving much of this setup code from JS into C++.

Comment 6

18 years ago
Making [nsbeta2-] and Putting on [NEED INFO] radar. PDT needs to know impact to 
user and risk of fix to make a call on this bug. Please let us know when you 
have a fix in hand so we can discuss whether to land this thing or not. Adding 
nsbeta3 keyword.
Keywords: nsbeta3
Whiteboard: [nsbeta2-][NEED INFO]

Comment 7

18 years ago
akkana and I spoke today about other issues.  we would like to see the 
editor.dll split into three different components. 

1.  text editing
2.  basic html editing
3.  form and table editing.

Comment 8

18 years ago
dougt, should you own this bug?


18 years ago
Keywords: embed

Comment 9

18 years ago
parts of this bug are embedding releated, other parts may not be.  I am going to 
break this bug up into a couple then see what we can do about fixing them.  

For now, assigning to me.
Assignee: sfraser → dougt

Comment 10

18 years ago
Whiteboard: [nsbeta2-][NEED INFO] → [nsbeta2-][NEED INFO][nsbeta3+]

Comment 11

18 years ago
Not enough time to do this.  punting.
Whiteboard: [nsbeta2-][NEED INFO][nsbeta3+] → [nsbeta2-]
Target Milestone: M18 → M26


18 years ago
Whiteboard: [nsbeta2-] → [nsbeta2-][nsbeta3-]

Comment 12

18 years ago
simon's taking on editor embedding point position.
Assignee: dougt → sfraser

Comment 13

18 years ago
Target Milestone: M26 → mozilla1.0

Comment 14

18 years ago
Updating QA Contact
QA Contact: jrgm → mdunn

Comment 15

18 years ago
*** Bug 30507 has been marked as a duplicate of this bug. ***


18 years ago
Blocks: 70229

Comment 16

17 years ago
Correction: Changing QA contact for the Embed API bugs to David Epstein.
QA Contact: mdunn → depstein

Comment 17

17 years ago
Bugs targeted at mozilla1.0 without the mozilla1.0 keyword moved to mozilla1.0.1 
(you can query for this string to delete spam or retrieve the list of bugs I've 
Target Milestone: mozilla1.0 → mozilla1.0.1

Comment 18

17 years ago
don't move bugs that are in the 1.0 dependency tree. sorry.
Target Milestone: mozilla1.0.1 → mozilla1.0

Comment 19

17 years ago
-> mjudge
Assignee: sfraser → mjudge


17 years ago
Summary: Need to design/ implement Editor Embedding APIs → [embed] Need to design/ implement Editor Embedding APIs


17 years ago
Blocks: 122158


17 years ago
Keywords: nsbeta2, nsbeta3


17 years ago
Keywords: topembed


17 years ago
Whiteboard: [nsbeta2-][nsbeta3-] → [nsbeta2-][nsbeta3-],DIGBug


17 years ago
Keywords: mozilla1.0+

Comment 20

16 years ago
EDT topembed-, not critical for a current embedding release
Keywords: topembed → topembed-


16 years ago
Target Milestone: mozilla1.0 → mozilla1.0.1

Comment 21

16 years ago
editor embedding not a 1.0 requirement. mozilla1.0-
Keywords: mozilla1.0+ → mozilla1.0-

Comment 22

16 years ago
changing component so this shows up in Syd's editor embedding queries
Component: Embedding: APIs → Editor: Core
Summary: [embed] Need to design/ implement Editor Embedding APIs → embedding: Need to design/ implement Editor Embedding APIs

Comment 23

16 years ago
resolving as a duplicate of 157128 per editor embedding meeting

*** This bug has been marked as a duplicate of 157128 ***
Last Resolved: 16 years ago
Resolution: --- → DUPLICATE

Comment 24

16 years ago
verified as dup
You need to log in before you can comment on or make changes to this bug.