Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsHTML WYSIWYG Editor
https://www.eclipse.org/forums/index.php/mv/msg/156207/492318/#msg_492318
Ideally something similar to Swing's JEditorPane.
If there isn't an existing widget, any advice on third-party libraries or workarounds would be gratefully received.
Many thanks in advance
D]]>No real name2009-10-19T22:29:40-00:00Re: HTML WYSIWYG Editor
https://www.eclipse.org/forums/index.php/mv/msg/156207/492764/#msg_492764
You can put the native browsers into design mode by executing some
javascript:
String type = browser.getBrowserType();
if (type.equals("ie")) {
// not sure why "document.designMode='On';" doesn't work for IE
browser.execute("document.body.contentEditable='true';");
} else {
browser.execute("document.designMode='On';");
}
Invoking Browser.getText() at any point gives you the resulting HTML when
using IE and Mozilla, but I notice that this still gives the original page
HTML content with Safari. Perhaps an alternate way to get the current HTML
would be to evaluate a javascript expression (eg.- for IE:
browser.evaluate("return document.documentElement.outerHTML;"), didn't try
the other browser types).
HTH,
Grant
<dale.lane@gmail.com> wrote in message
news:hbip8l$hp1$1@build.eclipse.org...
> What is the best way to include a WYSIWYG HTML Editor in an (ideally
standalone) SWT application?
>
> Ideally something similar to Swing's JEditorPane.
>
> If there isn't an existing widget, any advice on third-party libraries or
workarounds would be gratefully received.
>
> Many thanks in advance
>
> D]]>Grant Gayed2009-10-21T15:46:51-00:00