moved Text section to Wiki

This commit is contained in:
Dolan
2017-03-13 00:57:57 +00:00
committed by GitHub
parent 8c58ec2ba4
commit efa4f1933a

View File

@ -26,13 +26,6 @@
- [Text Alignment](#) - [Text Alignment](#)
- [Example](#) - [Example](#)
- [Thematic Break (Page Break)](#) - [Thematic Break (Page Break)](#)
- [Text](#)
- [Typographical Emphasis](#)
- [Bold](#)
- [Italics](#)
- [Underline](#)
- [Break](#)
- [Chaining](#)
- [Exporting](#) - [Exporting](#)
- [Express](#) - [Express](#)
- [Standalone .docx file](#) - [Standalone .docx file](#)
@ -178,73 +171,6 @@ var paragraph = new docx.Paragraph("Amazing Heading").heading1().pageBreak();
``` ```
The above example will create a heading and start a new page immediately afterwards. The above example will create a heading and start a new page immediately afterwards.
## Text
Paragraphs need `text run` objects. To create text:
```js
var text = new docx.TextRun("My awesome text here for my university dissertation");
paragraph.addText(text);
```
Text objects have methods inside which changes the way the text is displayed.
### Typographical Emphasis
More info [here](https://english.stackexchange.com/questions/97081/what-is-the-typography-term-which-refers-to-the-usage-of-bold-italics-and-unde)
#### Bold
```js
text.bold();
```
#### Italics
```js
text.italic();
```
#### Underline
```js
text.underline();
```
#### Strike through
```js
text.strike();
```
#### Double strike through
```js
text.doubleStrike();
```
#### Superscript
```js
text.superScript();
```
#### Subscript
```js
text.subScript();
```
#### All Capitals
```js
text.allCaps();
```
#### Small Capitals
```js
text.smallCaps();
```
### Break
Sometimes you would want to put text underneath another line of text but inside the same paragraph.
```js
text.break();
```
### Chaining
What if you want to create a paragraph which is ***bold*** and ***italic***?
```js
paragraph.bold().italic();
```
# Exporting # Exporting
Check the Wiki for exporting guide Check the Wiki for exporting guide