-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
49 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,83 +1,75 @@ | ||
# toDoc | ||
|
||
## toDoc : <code>object</code> | ||
Convert HTML/Text to a Word Documnet | ||
|
||
**Kind**: global namespace | ||
|
||
* [toDoc](#toDoc) : <code>object</code> | ||
* [.toDoc()](#toDoc.toDoc) ⇒ <code>object</code> | ||
* [.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() | ||
<a name="toDoc.toDoc"></a> | ||
|
||
### toDoc.toDoc() ⇒ <code>object</code> | ||
Master function | ||
|
||
**Returns**: `object`, Library object with global functions | ||
|
||
|
||
### toDoc.doc.createHeaderFooter(headerFooter, type, content, alignment, position, nextLine) | ||
**Kind**: static method of [<code>toDoc</code>](#toDoc) | ||
**Returns**: <code>object</code> - Library object with global functions | ||
**Access**: public | ||
<a name="toDoc.doc.createHeaderFooter"></a> | ||
|
||
### 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 <br/> Accepts : "header" | "footer" <br/> Required | ||
|
||
**type**: `string`, Defines whether the object contains an image, text or HTML markup <br/> Accepts : "image" | "text" | "html" <br/> Required | ||
|
||
**content**: `string`, Defines the object's content <br/> Accepts : stringified image URLs | stringified text | stringified HTML markup <br/> Required | ||
|
||
**alignment**: `string`, Defines the object's alignemnt <br/> Accepts : "left" | "center"| "right" <br/> Required | ||
**Kind**: static method of [<code>toDoc</code>](#toDoc) | ||
**Access**: public | ||
|
||
**position**: `number`, Specifies the position of the object <br/> Accepts : 1++ <br/> Default value : 0 <br/> Optional | ||
| Param | Type | Description | | ||
| --- | --- | --- | | ||
| headerFooter | <code>string</code> | Defines whether the object is header or footer <br/> Accepts : "header" | "footer" <br/> Required | | ||
| type | <code>string</code> | Defines whether the object contains an image, text or HTML markup <br/> Accepts : "image" | "text" | "html" <br/> Required | | ||
| content | <code>string</code> | Defines the object's content <br/> Accepts : stringified image URLs | stringified text | stringified HTML markup <br/> Required | | ||
| alignment | <code>string</code> | Defines the object's alignemnt <br/> Accepts : "left" | "center"| "right" <br/> Required | | ||
| position | <code>number</code> | Specifies the position of the object <br/> Accepts : 1++ <br/> Default value : 0 <br/> Optional | | ||
| nextLine | <code>boolean</code> | Specifes whether the object should start in a new line <br/> Accepts : true | false <br/> Default value : false <br/> Optional | | ||
|
||
**nextLine**: `boolean`, Specifes whether the object should start in a new line <br/> Accepts : true | false <br/> Default value : false <br/> Optional | ||
|
||
|
||
|
||
### toDoc.doc.createPage(content, number) | ||
<a name="toDoc.doc.createPage"></a> | ||
|
||
### toDoc.doc.createPage(content, number) | ||
Creates a Page object for the document | ||
|
||
**Parameters** | ||
|
||
**content**: `string`, Defines the page's content <br/> Accepts : stringified text | stringified HTML markup <br/> Required | ||
**Kind**: static method of [<code>toDoc</code>](#toDoc) | ||
**Access**: public | ||
|
||
**number**: `number`, Defines the Pages's number <br/> Accepts : 1+= <br/> Default value : 0 <br/> Required for individual pages <br/> Required if creating individual pages <br/> Optional if passing a whole HTML document | ||
| Param | Type | Description | | ||
| --- | --- | --- | | ||
| content | <code>string</code> | Defines the page's content <br/> Accepts : stringified text | stringified HTML markup <br/> Required | | ||
| number | <code>number</code> | Defines the Pages's number <br/> Accepts : 1+= <br/> Default value : 0 <br/> Required for individual pages <br/> Required if creating individual pages <br/> Optional if passing a whole HTML document | | ||
|
||
<a name="toDoc.doc.createParagraph"></a> | ||
|
||
|
||
### 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 <br/> Accepts : stringified text | stringified HTML markup <br/> Required | ||
|
||
**number**: `number`, Defines the Pages's number <br/> Accepts : 1+= <br/> Default value : 0 <br/> Required for individual pages <br/> Required if creating individual pages <br/> Optional if passing a whole HTML document | ||
**Kind**: static method of [<code>toDoc</code>](#toDoc) | ||
**Access**: public | ||
|
||
| Param | Type | Description | | ||
| --- | --- | --- | | ||
| content | <code>string</code> | Defines the page's content <br/> Accepts : stringified text | stringified HTML markup <br/> Required | | ||
| number | <code>number</code> | Defines the Pages's number <br/> Accepts : 1+= <br/> Default value : 0 <br/> Required for individual pages <br/> Required if creating individual pages <br/> Optional if passing a whole HTML document | | ||
|
||
<a name="toDoc.doc.createDocument"></a> | ||
|
||
### 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 <br/> Required | ||
|
||
**params**: `object`, Define custom parameters for the document's layout <br/> Optional | ||
|
||
|
||
|
||
|
||
* * * | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
**Kind**: static method of [<code>toDoc</code>](#toDoc) | ||
**Access**: public | ||
|
||
| Param | Type | Description | | ||
| --- | --- | --- | | ||
| filename | <code>string</code> | Specifies the name of the document <br/> Required | | ||
| params | <code>object</code> | Define custom parameters for the document's layout <br/> Optional | |