exportword

1.0.2 • Public • Published

exportfile

exportfile is a fast and small JavaScript library.

feature

  • the library can export a word which includes normal words,images and chars that building with echarts

params (exportElement, exportFileName, StringStyle,fileParams)

exportElement

  • outermost element of all elements that you want to export

exportFileName

StringStyle

  • the style must be string
`#main,#main1{
  height: 200px;
  width:200px
}
.list{
  background: blue;
  padding:10px
}
.img{
  padding: 50px;
}
.list .page{
  background: yellow;
  padding: 5px;
  height: 20px;
}`
title:
the property of margin will not word in style, but you can replace with text-align

fileParams

  • the fileParams contain two params (margin,orientation)
margin: descibe the margin of exported word
top: number (default: 1440, i.e. 2.54 cm)
right: number (default: 1440)
bottom: number (default: 1440)
left: number (default: 1440)
header: number (default: 720)
footer: number (default: 720)
gutter: number (default: 0)
orientation: string (default: portrait)
describe direction of words

use

For example:
import exportFile from 'exportfile'
exportFile({exportElement:'#id', exportFileName:'word.doc', StringStyle,fileParams:{margin:{top:50}}})
there is a samle in the project list:
samle.html

at last (the most important)

Readme

Keywords

none

Package Sidebar

Install

npm i exportword

Weekly Downloads

0

Version

1.0.2

License

ISC

Unpacked Size

480 kB

Total Files

8

Last publish

Collaborators

  • xueqingcheng