https://samples.gwtproject.org/samples/Showcase/Showcase.html#!CwRichText
这是 GWT 的服务器代码:
/**
* The constants used in this Content Widget.
*/
public static interface CwConstants extends Constants {
String cwRichTextDescription();
String cwRichTextName();
}
/**
* Initialize this example.
*/
@Override
public Widget onInitialize() {
// Create the text area and toolbar
RichTextArea area = new RichTextArea();
area.ensureDebugId("cwRichText-area");
area.setSize("100%", "14em");
RichTextToolbar toolbar = new RichTextToolbar(area);
toolbar.ensureDebugId("cwRichText-toolbar");
toolbar.setWidth("100%");
// Add the components to a panel
Grid grid = new Grid(2, 1);
grid.setStyleName("cw-RichText");
grid.setWidget(0, 0, toolbar);
grid.setWidget(1, 0, area);
return grid;
}
如果
gwt
是一个开源项目,那么在浏览器中呈现该区域的客户端源代码在哪里?
根据http://candidtim.github.io/gwt/2010/06/25/gwt-rich-text-editor.html
,gwt编辑器没有javascript代码您可以使用闭包库编辑器https://google.github.io/closure-library/source/closure/goog/demos/用于前端