My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
GettingStarted  
GWT Rich Text Widget - Getting Started
Featured
Updated Feb 4, 2010 by pave...@gmail.com

Installation

Installation steps:

  • Download (or compile) the latest JAR file
  • add the downloaded JAR file to classpath of the GWT Compiler/Shell
  • add:
    <inherits name="com.gc.gwt.wysiwyg.Editor">
    </inherits>
    to your module descriptor XML file

Note: for older versions (<= 0.1.2)

  • add:
    <inherits name="com.jpavel.gwt.wysiwyg.Editor">
    </inherits>
    to your module descriptor XML file

Sample Code

  HorizontalPanel hzContainer = new HorizontalPanel();

  Editor editor = new Editor();
  editor.setWidth("100%");
  editor.setHeight("300px");

  editor.setHTML("<h1>Hello World!</h1>");

  editor.addLoadListener(new LoadListener() {
     public void onLoad(Widget sender) {
        // do something if you want...
     }

     public void onError(Widget sender) {
     }
  });

  hzContainer.add(editor);

NOTE: editor.load() method has been removed.

Upgrading from 0.1.2 to 0.1.3

Update you GWT module descriptor file to include

<inherits name="com.gc.gwt.wysiwyg.Editor">
</inherits>

instead of

<inherits name="com.jpavel.gwt.wysiwyg.Editor">
</inherits>

Known Issues

see the Known Issues page

Comment by aboel...@gmail.com, Oct 3, 2007

How can i use it in my site my site build in PHP and smarty template

Comment by sravan...@gmail.com, Oct 23, 2007

Its not working on gwt1.4 ERROR? Uncaught exception escaped com.google.gwt.core.client.JavaScriptException?: JavaScript? Error exception: Unspecified error.

at com.google.gwt.dev.shell.ModuleSpace?.invokeNative(ModuleSpace?.java:481) at com.google.gwt.dev.shell.ModuleSpace?.invokeNativeVoid(ModuleSpace?.java:270) at com.google.gwt.dev.shell.JavaScriptHost?.invokeNativeVoid(JavaScriptHost?.java:137) at com.gc.gwt.wysiwyg.client.EditorWYSIWYG.initFrame(EditorWYSIWYG.java:59) at com.gc.gwt.wysiwyg.client.Editor.onLoad(Editor.java:98) at com.google.gwt.user.client.ui.Widget.onAttach(Widget.java:101) at com.google.gwt.user.client.ui.Composite.onAttach(Composite.java:87) at com.google.gwt.user.client.ui.Panel.onAttach(Panel.java:86) at com.google.gwt.user.client.ui.Composite.onAttach(Composite.java:90) at com.google.gwt.user.client.ui.Widget.setParent(Widget.java:216)

Comment by gui.semp...@gmail.com, Oct 26, 2007

Hi, i'm getting the following exception whenever trying to call the Editor() constructor (using GWT 1.4.60) :

java.lang.NullPointerException?: container may not be null

at com.google.gwt.user.client.ui.ComplexPanel?.insert(ComplexPanel?.java:157) at com.gc.gwt.wysiwyg.client.EditorToolbar?$EditorToolbarFlowPanel?.insert(EditorToolbar?.java:36) at com.gc.gwt.wysiwyg.client.EditorToolbar?.putWidget(EditorToolbar?.java:103) at com.gc.gwt.wysiwyg.client.EditorToolbar?.putWidgetLast(EditorToolbar?.java:109) at com.gc.gwt.wysiwyg.client.defaults.DefaultEditorToolbar?.<init>(DefaultEditorToolbar?.java:36) at com.gc.gwt.wysiwyg.client.Editor.<init>(Editor.java:61) at com.gc.gwt.wysiwyg.client.Editor.<init>(Editor.java:51)

Comment by RussianS...@gmail.com, Nov 23, 2007

Get the source code and update the class com.gc.gwt.wysiwyg.client.EditorToolbar? line 36. Change 'super.insert(w, null, beforeIndex)' to 'super.insert(w, beforeIndex)'

The original method call is deprecated and will always throw an exception when the second parameter is null

Cheers!

Comment by jaiat...@gmail.com, Jun 26, 2008

I tried to Change 'super.insert(w, null, beforeIndex)' to 'super.insert(w, beforeIndex)' but it can't be changed , It is in Non-editable state as it a Class File.... How to change?

Comment by tizianof...@gmail.com, Jul 20, 2008

sdf

Comment by lo.kev...@gmail.com, Jul 22, 2008

This is how I got it working (I'm using Eclipse), right click the source folder in eclipse, click Import --> General --> Archive File. Choose the jar file (editor-0.1.3.jar).

Now a bunch of "com.gc.gwt." folders should be in your source folder. From here, Eclipse will recognize the imports and you should also be able to modify any files you want.

Oh yeah, read the above posts to get past the exception that is thrown upon loading.

Good luck!

Comment by steven.b...@gmail.com, Jan 14, 2009

Previous instructions work well. There seem to be a number of problems with the Safari implementation.

Comment by pasvinc...@gmail.com, Mar 16, 2010

Did you plan to upgrade to gwt 2.0 ?

Comment by project member anei...@gmail.com, Mar 29, 2010

The latest version compiled for gwt 2.0

Comment by crui...@gmail.com, Jan 8, 2011

Hi hello. Where can I find the API doc for this RichTextEditor??.

Thank you.

Comment by crui...@gmail.com, Jan 8, 2011

Hey, I've been playing around with the RixhTextEditor?, its a nice widget. Im doing an app where I wanted something to edit the text, but I will only need about three buttons of the EditorToolBar?. Do I have to Manually remove everysingle button?. That makes the app slow at the beginning and also is throwing an error.

I just need the Style Size FontName? Bold and Italic. What is the best way to accomplish this?.

Thank you in adanced.

Comment by santlal8...@gmail.com, Apr 16, 2011

Hi, I am using GWT 2.1. This widget work properly in Chrome but not in Firefox. Could you please help me. Thanks in Advance..


Sign in to add a comment
Powered by Google Project Hosting