Solid:WYSIWYGPreview

From MozillaWiki
Revision as of 12:42, 25 August 2005 by Lgersman (talk | contribs)
Jump to navigation Jump to 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).

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.