将复杂格式的Word文档转换为合理的HTML

时间:2013-10-22 19:48:58

标签: html ms-word ms-office

我有很多由多个嵌套列表组成的文本数据片段,所有这些片段都组合成一个单词文档,需要保存到数据库字段以便在浏览器中进行最终呈现。我愿意剪切并粘贴到数据库中,但我需要将Word格式转换为简单,干净的HTML。

例如,在Word中我有:

  

这个问题有两个部分,总共有6个标记

1. Answer should cover
   - List item (2 marks)
   - List item (2 marks)
   - List item (2 marks)
2. And logically tie the items together (2 marks)

我需要的是:

<p> This question has two parts, for a total of 6 marks </p>
<ol type="1">
<li> Answer should cover <ul> <li>List item (2 marks)</li>...</ul>
etc.

这样做有什么简单的方法吗?

Word 另存为网页似乎需要尽可能多的工作来清理它,而不是手工完成。

粘贴到Visual Studio设计窗口并不是更好。

0 个答案:

没有答案