项目作者: renjithspace

项目描述 :
Pure JavaScript plugin for preserves spaces and line breaks
高级语言: HTML
项目地址: git://github.com/renjithspace/pre.js.git
创建时间: 2017-07-19T16:14:42Z
项目社区:https://github.com/renjithspace/pre.js

开源协议:

下载


Pre.js

Pure JavaScript plugin for preserves spaces and line breaks

Installation

NPM

  1. npm install pre.js --save

In Node.js:

  1. require('pre.js')

Bower

  1. bower install pre.js --save

Direct download from latest releases

Usage

Include

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

Initialize

  1. new Pre();

Config

  1. new Pre({
  2. // Options here
  3. property: value,
  4. ...
  5. });

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