From a46f05862508deae38903e1ff0b04865ad38f131 Mon Sep 17 00:00:00 2001 From: abs1337 Date: Wed, 23 Oct 2019 19:55:03 +0530 Subject: [PATCH] Update README.md --- README.md | 106 +++++++++++++++++++++++++----------------------------- 1 file changed, 49 insertions(+), 57 deletions(-) diff --git a/README.md b/README.md index 70768f5..876c33c 100644 --- a/README.md +++ b/README.md @@ -1,83 +1,75 @@ -# toDoc - +## toDoc : object Convert HTML/Text to a Word Documnet +**Kind**: global namespace +* [toDoc](#toDoc) : object + * [.toDoc()](#toDoc.toDoc) ⇒ object + * [.doc.createHeaderFooter(headerFooter, type, content, alignment, position, nextLine)](#toDoc.doc.createHeaderFooter) + * [.doc.createPage(content, number)](#toDoc.doc.createPage) + * [.doc.createParagraph(content, number)](#toDoc.doc.createParagraph) + * [.doc.createDocument(filename, params)](#toDoc.doc.createDocument) -* * * - -### toDoc.toDoc() + +### toDoc.toDoc() ⇒ object Master function -**Returns**: `object`, Library object with global functions - - -### toDoc.doc.createHeaderFooter(headerFooter, type, content, alignment, position, nextLine) +**Kind**: static method of [toDoc](#toDoc) +**Returns**: object - Library object with global functions +**Access**: public + +### toDoc.doc.createHeaderFooter(headerFooter, type, content, alignment, position, nextLine) Creates a Header or a Footer object for the document -**Parameters** - -**headerFooter**: `string`, Defines whether the object is header or footer
Accepts : "header" | "footer"
Required - -**type**: `string`, Defines whether the object contains an image, text or HTML markup
Accepts : "image" | "text" | "html"
Required - -**content**: `string`, Defines the object's content
Accepts : stringified image URLs | stringified text | stringified HTML markup
Required - -**alignment**: `string`, Defines the object's alignemnt
Accepts : "left" | "center"| "right"
Required +**Kind**: static method of [toDoc](#toDoc) +**Access**: public -**position**: `number`, Specifies the position of the object
Accepts : 1++
Default value : 0
Optional +| Param | Type | Description | +| --- | --- | --- | +| headerFooter | string | Defines whether the object is header or footer
Accepts : "header" | "footer"
Required | +| type | string | Defines whether the object contains an image, text or HTML markup
Accepts : "image" | "text" | "html"
Required | +| content | string | Defines the object's content
Accepts : stringified image URLs | stringified text | stringified HTML markup
Required | +| alignment | string | Defines the object's alignemnt
Accepts : "left" | "center"| "right"
Required | +| position | number | Specifies the position of the object
Accepts : 1++
Default value : 0
Optional | +| nextLine | boolean | Specifes whether the object should start in a new line
Accepts : true | false
Default value : false
Optional | -**nextLine**: `boolean`, Specifes whether the object should start in a new line
Accepts : true | false
Default value : false
Optional - - - -### toDoc.doc.createPage(content, number) + +### toDoc.doc.createPage(content, number) Creates a Page object for the document -**Parameters** - -**content**: `string`, Defines the page's content
Accepts : stringified text | stringified HTML markup
Required +**Kind**: static method of [toDoc](#toDoc) +**Access**: public -**number**: `number`, Defines the Pages's number
Accepts : 1+=
Default value : 0
Required for individual pages
Required if creating individual pages
Optional if passing a whole HTML document +| Param | Type | Description | +| --- | --- | --- | +| content | string | Defines the page's content
Accepts : stringified text | stringified HTML markup
Required | +| number | number | Defines the Pages's number
Accepts : 1+=
Default value : 0
Required for individual pages
Required if creating individual pages
Optional if passing a whole HTML document | + - -### toDoc.doc.createParagraph(content, number) - +### toDoc.doc.createParagraph(content, number) Creates a Page object for the document -**Parameters** - -**content**: `string`, Defines the page's content
Accepts : stringified text | stringified HTML markup
Required - -**number**: `number`, Defines the Pages's number
Accepts : 1+=
Default value : 0
Required for individual pages
Required if creating individual pages
Optional if passing a whole HTML document +**Kind**: static method of [toDoc](#toDoc) +**Access**: public +| Param | Type | Description | +| --- | --- | --- | +| content | string | Defines the page's content
Accepts : stringified text | stringified HTML markup
Required | +| number | number | Defines the Pages's number
Accepts : 1+=
Default value : 0
Required for individual pages
Required if creating individual pages
Optional if passing a whole HTML document | + -### toDoc.doc.createDocument(filename, params) - +### toDoc.doc.createDocument(filename, params) Generates and saves a Word document. -**Parameters** - -**filename**: `string`, Specifies the name of the document
Required - -**params**: `object`, Define custom parameters for the document's layout
Optional - - - - -* * * - - - - - - - - - +**Kind**: static method of [toDoc](#toDoc) +**Access**: public +| Param | Type | Description | +| --- | --- | --- | +| filename | string | Specifies the name of the document
Required | +| params | object | Define custom parameters for the document's layout
Optional |