GWT有显示RTF类型数据的richtextbox吗?
我正在使用 GWT Richtextbox,但此小部件显示的值是简单文本或 HTML 格式。 有没有办法在 GWT-Richtext 或 GWT-htmlEditor 小部件中显示 RTF 数据?或者其他 GWT 库中是否有一个小部件可以执行此操作?
I'm using GWT Richtextbox, But this widget shows values which are simple text or HTML formatted.
Is there any way to show RTF data in a GWT-Richtext or GWT-htmlEditor widget? Or is there a widget in other GWT libraries which will do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我不这么认为。大约一年前,我们想在客户端开发 rtf 浏览器,但失败了。
没有 GWT-Rtf 库。你可以尝试找到一些用 javascript 编写的东西,然后用 JSNI 包装它,但我还没有看到这样的库。有人告诉我用Activex也许可以,但我们还没有尝试过这种方法。
I don't think so. About year ago we wanted to develop rtf browser on client side and we failed.
There is no GWT-Rtf libraries. You could try to find something written in javascript and then wrap it with JSNI, but I haven't seen such library as well. Someone told me that it might be possible with Activex, but we haven't even tried this method.
你想达到什么目的?如果您想与 RTF 编辑器(例如 Microsoft Word)共享文档,您应该检查该编辑器是否也可以使用 HTML。我知道 MS Word 可以编辑 HTML。
或者,您可以考虑将 RTF 转换为 HTML,然后在服务器端再次转换回来。有几个 Java 库可以做到这一点,我相信 Flying Saucer 是其中之一。
What are you trying to achieve? If you want to share documents with an RTF editor like, say, Microsoft Word, you should check to see if that editor can also work with HTML. I know that MS Word can edit HTML.
Alternatively, you might consider transposing RTF into HTML and back again on the server side. There are several Java libraries out there for doing that, and I believe that Flying Saucer is one of them.
您可以将 RTFEditorKit 与 HTMLEditorKit 结合使用,在两个服务器端或小程序中进行转换。这样您就可以使用 GWT 的富文本编辑器并输出或输入 RTF。
You could use RTFEditorKit in combination with HTMLEditorKit to convert between the two server-side or in an applet. This way you can use GWT's rich text editor and output or input RTF.