diff --git a/README.md b/README.md index e758b0ac90..f378f348c8 100644 --- a/README.md +++ b/README.md @@ -19,13 +19,6 @@ - [Install](#) - [Usage](#) - [Create simple Word Document](#) - - [Create Paragraph](#) - - [Styles](#) - - [Heading1 - Heading5](#) - - [Title](#) - - [Text Alignment](#) - - [Example](#) - - [Thematic Break (Page Break)](#) - [Exporting](#) - [Express](#) - [Standalone .docx file](#) @@ -96,81 +89,6 @@ revision You can mix and match whatever properties you want, or provide no properties. -## Create Paragraph -Every text block in OpenXML is organised in paragraphs. You can add more text to the paragraph by doing this: -```js -var paragraph = new docx.Paragraph(), -``` -```js -var text = new docx.TextRun('Lorem Ipsum Foo Bar'); -var paragraph = new docx.Paragraph(); -paragraph.addText(text); -``` -```js -var paragraph = new docx.Paragraph("Short hand notation for adding text."); -``` - -After you create the paragraph, you must add the paragraph into the `document`: -```js -doc.addParagraph(paragraph); -``` - -### Styles -Styles is a very important part of the look of a word document. At the moment, only headings and title is supported, but son the rest will be supported along with custom styles! - -![Word 2013 Styles menu](http://content.gcflearnfree.org/topics/233/style_apply_choose.png "Word 2013 Styles menu") - -#### Heading1 - Heading5 -```js -paragraph.heading1(); -paragraph.heading2(); -paragraph.heading3(); -paragraph.heading4(); -paragraph.heading5(); -``` - -#### Title -```js -paragraph.title(); -``` - -### Text Alignment -To change the text alignment of a paragraph, for center, left, right or justified: -```js -paragraph.center(); -``` -```js -paragraph.left(); -``` -```js -paragraph.right(); -``` -```js -paragraph.justified(); -``` - -#### Example -```js -paragraph.heading1().center(); -``` -The above will create a `heading 1` which is `centered`. - -### Thematic Break -To add a break in the page, simply add `.thematicBreak()` on a paragraph: - -```js -var paragraph = new docx.Paragraph("Amazing Heading").heading1().thematicBreak(); -``` -The above example will create a heading with a page break directly under it. - -### Page Break -To move to a new page (insert a page break), simply add `.pageBreak()` on a paragraph: - -```js -var paragraph = new docx.Paragraph("Amazing Heading").heading1().pageBreak(); -``` -The above example will create a heading and start a new page immediately afterwards. - # Exporting Check the Wiki for exporting guide