Skip to content

Latest commit

 

History

56 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pre.js

Pure JavaScript plugin for preserves spaces and line breaks

Installation

NPM

npm install pre.js --save

In Node.js:

require('pre.js')

Bower

bower install pre.js --save

Direct download from latest releases

Usage

Include

<script src="dist/js/pre.js"></script>

Initialize

new Pre();

Config

new Pre({
    // Options here
    property: value,
    ...
});

Options

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

Contribution

  1. Fork and clone the repository
  2. Install development dependencies npm install
  3. Contribute
  4. Build npm run build
  5. Commit and push
  6. Do pull request

About

Pure JavaScript plugin for preserves spaces and line breaks

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages