rtf转html的js文件,GitHub - tbluemel/rtf.js: Render RTF documents in HTML.

rtf.js

68747470733a2f2f7472617669732d63692e6f72672f74626c75656d656c2f7274662e6a732e7376673f6272616e63683d6d6173746572

68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f74626c75656d656c2f7274662e6a732f62616467652e7376673f6272616e63683d6d6173746572

68747470733a2f2f62616467652e667572792e696f2f6a732f7274662e6a732e737667

Render RTF documents in HTML. This also includes rendering WMF and EMF images which are often contained in RTF documents.

License

The code of this project is licensed under the MIT license. See the file LICENSE for details.

Using the library

For information on how to use the library see the Getting Started Guide

Live samples:

Dependencies

rtf.js requires:

js-codepage (Apache 2.0 license, included in the rtf.js bundle)

Rendering WMF and EMF images is accomplished by using HTML5's feature.

Rendering RTF documents often requires rendering embedded WMF and EMF images, however rtf.js can be used without wmf.js and emf.js or with just one of them, if rendering such images is not required.

Developing

To develop first install the dependencies using npm install.

Build with watch mode

For development purposes you can start a watch, which will build the project, serve the sample pages on localhost:8080 and automatically recompile and reload the sample page if you make a code change. This can be started with:

$ npm run watch

Building

To build the entire project and create the bundles run:

$ npm run build

Tests

Please run npm run lint first to make sure your code adheres to the style guide and npm run build to build the code to be tested

To run the test suite run:

$ npm run test

To create a new test (type is rtf, emf or wmf):

$ npm run generate-testcase

To regenerate the expected result for an existing test:

$ npm run regenerate-testcase

Code Coverage

To generate code coverage metrics run:

$ npm run coverage

Afterwards you can generate a nice html report in the coverage directory:

$ npm run coverage-html

Warning: creating coverage reports instruments the bundles in the dist directory.

Don't forget to build the project again before committing.

Releasing

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值