xd-html2bbcode
v1.0.0
Published
Convert HTML to BBCode with custom codes
Downloads
32
Maintainers
Readme
html2bbcode.js
Convert HTML to BBCode
Licenses
MIT
Installation:
npm i git+http://gitlab.ragnaroknotes.com/npm-modules/xd-html2bbcode.git
Usage:
var HTML2BBCode = require('./html2bbcode').HTML2BBCode;
var converter = new HTML2BBCode(opts);
var bbcode = converter.feed(data);
console.log(bbcode.toString());
$ npm install -g html2bbcode
$ html2bbcode --imagescale test.html
Options
new HTML2BBCode({
// enable image scale, default: false
imagescale: true,
// enable transform pixel size to size 1-7, default: false
transsize: true,
// disable list <ul> <ol> <li> support, default: false
nolist: true,
// disable text-align center support, default: false
noalign: true,
// disable HTML headings support, transform to size, default: false
noheadings: true
});