This repository was archived by the owner on Mar 10, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Options
Adrian Preuß edited this page May 24, 2017
·
3 revisions
You can set many options to the parser.
For example:
const formatting = require('../index.js');
formatting.setOptions({
/* Your Options */
});
WARNING
setOptions
overwrite ALL Settings. If you only want to set special options, usesetOption
!
You can find EXAMPLES here: github.com/DST-Tools/steam-formatting/tree/master/Examples
formatting.setOptions({
links: {
whitelist: {
domains: [
'steampowered.com'
],
referer: 'http://test.example.com/redirect=',
remove: false
},
blank: true
},
newLine: true
});
Option | Default | Possible Settings | Description |
---|---|---|---|
newLine | true |
true , false
|
Break lines automatically (\r\n to <br /> ) |
links | Object |
Object , false
|
Disable Links = false , otherwise Object for Link-Settings |
Option | Default | Possible Settings | Description |
---|---|---|---|
whitelist | Object |
Object , false
|
Disable Whitelist = false , otherwise Object for whitelist-Settings |
blank | true |
true , false
|
Open Links in new Tab (target="_blank" ) |
Option | Default | Possible Settings | Description |
---|---|---|---|
domains | Array |
Array , false
|
Disable Whitelist = false , otherwise Array with whitelisted domains or subdomains |
referer | false |
URL , false
|
Non-Whitelisted domains will be open over an internal URL like http://example.com/warning_outgoing.php?url=$URL
|
remove | false |
true , false
|
Remove non-whitelisted domains (true ) or show the original formatting tag (false ) like `[url=http://example.com/]Your Link[/url] |