imagineeasy-format-preserver

1.0.4 • Public • Published

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>

Readme

Keywords

none

Package Sidebar

Install

npm i imagineeasy-format-preserver

Weekly Downloads

1

Version

1.0.4

License

Apache-2.0

Last publish

Collaborators

  • bluemaex
  • darshanbib
  • fholzhauer
  • rwos
  • sashless
  • till