如何在GWT-Ext的HtmlEditor中显示图像

时间:2011-07-26 07:38:01

标签: java image gwt html-editor gwt-ext

我正在使用GWT 2.0,GWT-Ext 1.5&带有Mozilla 3.6.x的Java 1.6。

我正在尝试在HTMLEditor中显示图像。但我无法做到这一点。这是我的代码:

public void onModuleLoad() {
        FormPanel mainpanel = new FormPanel();
        mainpanel.setTitle("Main Panel");
        mainpanel.setLayout(new VerticalLayout(5));
        mainpanel.setSize(700,550);
        mainpanel.setBorder(true);
        mainpanel.setAutoScroll(true);

        HtmlEditor htmlEditor = new HtmlEditor();
        htmlEditor.setWidth("600px");
        mainpanel.add(htmlEditor);
        RootPanel.get("panels").add(mainpanel);
}

显示编辑器后,我正在“源编辑模式”中写下以下行:

<img src = "(path of a jpg file)"></img>

但无法在标准模式下看到上传的图像。我错过了什么吗?

提前致谢。

0 个答案:

没有答案