Solid:WYSIWYGPreview

From MozillaWiki
Jump to: navigation, search

It would be very nice to embed XULRunner/Firefox into Eclipse/SWT for XUL preview and/or live editing inside Eclipse.

You can help us by voting for this Eclipse feature Allow Firefox as browser widget.

There are some other feature requests similar to this:

See all eclipse/mozilla related bugs/issues here

XUL WYSIWYG Editor alternatives

Using Visual Editing Framework

The Eclipse Visual Editor project is a vendor-neutral, open development platform supplying frameworks for creating GUI builders, and exemplary, extensible tool implementations for Swing/JFC and SWT/RCP.

Pros: Using this framework it is possible to (re)implement XUL (Layout/Widgets etc) to get (nearly) the same rendering result as gecko.

Cons: The rendered result will not 100% the same as gecko's layout (no real wysiwyg...). Furthermore this solution might not reflect special behaviour of different gecko version (for example canvas element supported/not supported and so on).

We may turn out to be able to use the xulcreator stuff based on SWT by RJ Keller, I think he's doing stuff that may be reusable. --AxelHecht 08:06, 25 Aug 2005 (PDT)

Just found ide4lazlo, which has some interesting screenshots.

Embed/Reuse XULRunner/Mozilla/Firefox

It is (in general) possible to embed a Mozilla/Gecko Window into Eclipse/SWT on every platform supported by Mozilla and SWT.

We could build the WYSIWYG editor as Multipage editor and embed the Mozilla XUL Window as WYSIWYG Preview.

Pros: True WYSIWYG. Depending of the used Mozilla version the preview would reflect the real XUL capabilities of the used Mozilla. Relatively small amount of code for the editor.

Cons: Currently not implemented. May result in problems if the displayed XUL page contains javascript modifying the user interface at runtime.

Possible workarounds:

  • Use of a transient xul layer above the real XUL page (can be done by xul code injection while loading the xul file in the preview).
  • Rendering of the xul page into a canvas element which is then displayed in the xul preview. In this case no user defined javascript worries the rendered result.

Related links

Mozilla Browser widget for Mac provided by Hiroyuki Okamoto

Investigate Browser based on GtkMozembed widget (attached is a gtkembed based prototype)

Need support for Mozilla browser widget on Windows platforms - WOW - this bug has the working source attached for the mozilla-widget on windows !

Composer - SWT HTML Editor Widget - embedds Mozilla as editor control. Available for win/*nix/osx.

IDE4Lazlo IBM stuff for lazlo, this may be a guide line on what is possible.