1.0.4 • Published 8 years ago

imagineeasy-format-preserver v1.0.4

Weekly downloads
1
License
Apache-2.0
Repository
github
Last release
8 years ago

format-preserver

Given you want to strip HTML markup and styles from a string this small library will help you with that. A common use case is to preserve styles like B, U, I when pasting into a texteditor but remove all other styles and markup.

Install

  • npm install imagineeasy-format-preserver --save

Dev Setup

  • make install

CI

  • make ci

Usage

var FormatPreserver = require('imagineeasy-format-preserver');

FormatPreserver.sanitize('<i><p style="font-weight: bold">Bold text</p></i>');
// returns  <span style="font-style: italic"><span style=font-weight: bold>Italic Bold text</span></span>
1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

9 years ago

1.0.0

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago