Intial Commit
This commit is contained in:
18
nodered/rootfs/data/node_modules/html-to-text/example/html-to-text.js
generated
vendored
Normal file
18
nodered/rootfs/data/node_modules/html-to-text/example/html-to-text.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
var path = require('path');
|
||||
|
||||
var htmlToText = require('../lib/html-to-text');
|
||||
|
||||
console.log('fromString:');
|
||||
var text = htmlToText.fromString('<h1>Hello World</h1>', {
|
||||
wordwrap: 130
|
||||
});
|
||||
console.log(text);
|
||||
console.log();
|
||||
|
||||
console.log('fromFile:');
|
||||
htmlToText.fromFile(path.join(__dirname, 'test.html'), {
|
||||
tables: ['#invoice', '.address']
|
||||
}, function(err, text) {
|
||||
if (err) return console.error(err);
|
||||
console.log(text);
|
||||
});
|
||||
Reference in New Issue
Block a user