Pure JavaScript plugin for preserves spaces and line breaks
NPM
npm install pre.js --save
In Node.js:
require('pre.js')
Bower
bower install pre.js --save
Direct download from latest releases
Include
<script src="dist/js/pre.js"></script>
Initialize
new Pre();
new Pre({
// Options here
property: value,
...
});
Property | Description | Available values | Default value |
---|---|---|---|
el | Pre.js element | Element selector (string) | '.pre' |
spaces | Enable/Disable spaces preserver | true, false(boolean) | false |
newlines | Enable/Disable line breaks preserver | true, false (boolean) | true |
- Fork and clone the repository
- Install development dependencies
npm install
- Contribute
- Build
npm run build
- Commit and push
- Do pull request