跨平台RTF控制?
有谁知道可以在 Linux/Windows/Mac 上使用的 RTF 控件吗? 不幸的是我不得不提一下它,但它实际上必须能够保存和打开 rtf 文件...与 wxWidgets wxRichTextCtrl 不同。
编辑:感谢 HappySmileMan 的回复。 如果它更像是一个独立的而不是它所依赖的大型库的一部分,那就更好了。
编辑:...看起来它不能打开 rtf 文件...呃。
Does anyone know of an RTF control that can be used on Linux/Windows/Mac? It's unfortunate that I have to mention it, but it actually has to be able to save and open rtf files... unlike wxWidgets wxRichTextCtrl for instance.
Edit: Thanks to HappySmileMan for his reply. Better still if it's more of a standalone and not a part of a large library that it would depend on.
Edit: ... and it doesn't look like it can open rtf files... ugh.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
Qt的控件是HTML,而不是RTF(尽管foobar可能只是意味着富文本,在这种情况下就可以了)
Qt's control is HTML, not RTF (though foobar may just mean rich text, in which case it would be fine)
如果我正确理解了这个问题,那么您正在寻找的功能就在 Qt 工具包中。
有关这方面的一些信息可以在 https://doc.qt.io/qt- 5/richtext.html
If I understand the question correctly, the feature you are looking for is in the Qt toolkit.
Some info on this can be found at https://doc.qt.io/qt-5/richtext.html
看来我想要的(读写实际rtf文件的跨平台rtf控件)并不存在,至少不存在免费和开源的。
...我会接受这个答案,但这似乎不可能。
It seems that what I want (cross platform rtf control that reads and writes actual rtf files) doesn't exist, at least not for free and open source.
...I'd accept this answer but it doesn't seem possible.
RTF 并不常见。 这是一种由 Microsoft 控制的混乱格式,基本上是 .doc 格式的文本转储。 据我所知,唯一的开源 RTF 实现是在 Abiword、OpenOffice 和 KWord 中。 所有这些都是跨平台的,但没有一个可能符合您的喜好作为“控件”(尽管 abiword 有 bonobo 界面,而 KWord 有 KPart,因此它们可以嵌入,尽管是以重量级的方式)。
RTF is simply not that common; it's a messy format controlled by Microsoft, basically a text dump of the .doc format. The only open source RTF implementations I know of are in Abiword, OpenOffice, and KWord. All are cross-platform, but none probably qualify as "controls" to your liking (though abiword has a bonobo interface, and KWord has a KPart, so they can be embedded, albeit in a heavyweight fashion).