1.2.3 • Published 3 years ago

js-word-image v1.2.3

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

js-word-image V1.2.3

Support the front-end export of word documents to local, support the customization of word content, and support pictures (URL format)

Update V1.2.3

更新将npm包打包后ES6转ES5

Installation

npm -i --save sw-exportword

In JavaScript

Support word

import { ExportWord } from 'sw-exportword';

const htmlStr = `<div>
                    <span>Hello Word</span>
                    <img width=400 height=300 src='httpurl'  alt='Loading failed'>
                </div>`;
// 导出 支持传入String类型
ExportWord(htmlStr, 'wordname.doc');

Supports custom styles for word text

import { ExportWord } from 'sw-exportword';

const htmlStr = `<div>
                    <span class='title-span'>Hello Word</span>
                </div>`;
const htmlStyle = ".title-span{ font-size:16px; color:red }";

// Export Supports incoming Object types containing custom styles
ExportWord({htmlStr, htmlStyle}, 'wordname.doc');

Supports exporting images to word documents (only URL format is supported temporarily)

import { ExportWord } from 'sw-exportword';

const htmlStr = `<img width="300" height="300" src="httpurl" alt="Loading failed" />`;

// Export Support for pictures (URL format)
ExportWord(htmlStr, 'wordname.doc');
1.2.3

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.1.3

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago