htmlCanvas.setOverflow(Overflow.HIDDEN);
htmlCanvas.setCanDragResize(true);
htmlCanvas.setShowEdges(true);
htmlCanvas.setContents("Click <b>Set Canvas HTML</b> to display edited content.");
final RichTextEditor richTextEditor = new RichTextEditor();
richTextEditor.setHeight(155);
richTextEditor.setOverflow(Overflow.HIDDEN);
richTextEditor.setCanDragResize(true);
richTextEditor.setShowEdges(true);
// Standard control group options include
// "fontControls", "formatControls", "styleControls" and "colorControls"
//richTextEditor.setControlGroups(new String[]{"fontControls", "styleControls"});
richTextEditor.setValue(ajaxDefinition);
layout.addMember(richTextEditor);
IButton button = new IButton("Set Canvas HTML");
button.setWidth(150);
button.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
htmlCanvas.setContents(richTextEditor.getValue());
}
});
layout.addMember(button);
layout.addMember(htmlCanvas);