You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-3Lines changed: 20 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -45,9 +45,26 @@ console.log(text);
45
45
46
46
You can configure the behaviour of html-to-text with the following options:
47
47
48
-
*`tables` allows to select certain tables by the `class` attribute from the HTML document. This is necessary because the majority of HTML E-Mails uses a table based layout. So you have to define which tables should be treaded as `table`. All other tables are ignored.
49
-
*`wordwrap` defines after how many chars a line break should follow in `p` elements.
50
-
48
+
*`tables` allows to select certain tables by the `class` attribute from the HTML document. This is necessary because the majority of HTML E-Mails uses a table based layout. So you have to define which tables should be treaded as `table`. All other tables are ignored. Default: `[]`
49
+
*`wordwrap` defines after how many chars a line break should follow in `p` elements. Default: `80`
50
+
51
+
## Command Line Interface
52
+
53
+
It is possible to use html-to-text as command line interface. This allows an easy validation of your generated text and the integration in other systems that does not run on node.js.
54
+
55
+
`html-to-text` uses `stdin` and `stdout` for data in and output. So you can use `html-to-html` the following way:
56
+
57
+
```
58
+
cat examples/test.html | html-to-text > test.txt
59
+
```
60
+
61
+
There also all options available as described above. You can use them like this:
0 commit comments