Simon Fraser wrote:

> [Also posted on the embedding newsgroup. Follows there, please.]
>
> The way I have implemented this so far (and I have it working to
> the extent that I can edit, and apply styles to documents in a
> frameset, and in iframes) is to subclass webShell:
>
>             nsDocShell
>                ^
>                |
>            nsWebShell
>                ^
>                |
>          nsEditorDocShell  -- adds nsCOMPtr<nsIEditor> member
>                ^
>                |
>           nsEditingShell   -- adds nsCOMPtr<nsIEditingSession> member
>

My concern with doing it this way is that it means someone who has a
webbrowser instance in front of them cannot flip a switch and have it
turn into an editor session and vice versa. It would be very cool to able
do in-place editing like this rather than explicitly create either a web
browser or editor up front and not be able to switch between them without
great difficulty.

As an alternative to subclassing would it be possible for the editor
session to dynamically register a listener with the docshell at session
startup and have the docshell call out to to it?

Adam

Reply via email to