解析HTML /显示RTF文本? [英] Parse/display RTF text in HTML?

查看:1623
本文介绍了解析HTML /显示RTF文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在寻找采取一些RTF code,如跌破此示例摘录,和显示在一个HTML页面。我并不需要它进行编辑,并且不希望它是在这个时候。在研究这个,我看到了很多的RTF功能的WYSIWYG编辑器,但是这不是真的我后。

I'm looking to take some RTF code, such as this sample excerpt below, and displaying it in an HTML page. I don't need it to be editable, and don't want it to be at this time. In researching this I've seen plenty of RTF-capable WYSIWYG editors, but that's not really what I'm after.

{}
{\rtf1\ansi\ansicpg1252\uc1\htmautsp\deff2
    {\fonttbl{\f0\fcharset0 Times New Roman;}
    {\f2\fcharset0 Segoe UI;}
    {\f3\fcharset0 Microsoft Yi Baiti;}
}
{\colortbl\red0\green0\blue0;\red255\green255\blue255;}
\loch\hich\dbch\pard\plain\ltrpar\itap0
{\lang1033\fs18\f2\cf0 \cf0\ql{\fs24\f2 
{\loch\f3\ltrch Hello }

有没有什么办法可以在HTML页面中显示RTF?它会更好,试图解析成HTML / CSS或者是,即使可能吗?我还审议了关于.NET端解析它,但都没有碰到过的解决方案。

Is there any way to display RTF in an HTML page? Would it be better to try and parse it into HTML/CSS or is that even possible? I also considered parsing it on the .NET side, but haven't came across any solutions.

任何有识之士将大大AP preciated!

Any insight would be greatly appreciated!

推荐答案

FWIW,我会去与这里找到了解决办法,因为它似乎是最灵活的。

FWIW, I'm going to go with the solution found here, as it seems the most flexible.

转换RTF和HTML <之间/强>

这篇关于解析HTML /显示RTF文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆