RTF 在浏览器中的行为
我正在从后端接收文本并将其显示在我的网页上。文本可以采用三种格式之一:纯文本、HTML 和 RTF。我确信前两个渲染不会出现任何问题,也不会丢失格式。
Web 浏览器能否正确解释和呈现 RTF?
I am receiving text from a backend and displaying it on my web page. The text could be in one of three formats: plain text, HTML, and RTF. I am sure the first two will render without any problems, or loss of formatting.
Will RTF be interpreted and rendered properly by web browsers?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不,RTF 根本不会渲染。
No, RTF will not render at all.
实际的浏览器本身不会直接渲染 RTF,因为浏览器渲染 html。
但是,浏览器将接收从服务器发送的 RTF,并将启动最终用户系统上的任何默认 RTF 编辑器。默认情况下,在 Windows 上,这通常是写字板。
但是,如果最终用户安装了 Microsoft Word 或其他 RTF 编辑器,则可能会启动该编辑器。然后,最终用户将能够在此编辑器中阅读 RTF。
在我的系统上,将 RTF 推送到客户端将启动 Word,并提供立即打开或保存 RTF 文件的选项。
我希望这会有所帮助。
The actual browser itself will not render the RTF directly because a browser renders html.
However, the browser will receive the RTF sent from the server and will launch whatever default RTF editor is in place on the end users system. By default on windows, this is typically wordPad.
However if an end user has Microsoft Word in place or another RTF editor this could be the editor that gets launched. The end user will then be able to read the RTF in this editor.
On my system pushing RTF to a client will launch Word and give me the option to either Open or Save the RTF file immediately.
I hope this helps out.