Over a million developers have joined DZone.
Platinum Partner

Cutter.js - A Library For Truncating HTML Code By Word Number Without Losing Markup

· Web Dev Zone

The Web Dev Zone is brought to you in partnership with Mendix. Download this Forrester Report to gain a better understanding of the low-code platform market and how to make a strategic platform selection you won’t regret.

Cutter.js is a library used for truncating HTML code to limit its length, by word number, without losing the markup.  Cutter solves the problem when its needed to cut some content by a number of words but its mandatory no lose any markup. Cutter cuts the content to the number of requested words and if needed puts a link to open the full content again.

Features

  • No markup is lost.
  • Framework agnostic.
  • The content can be written without take care about the full content.
  • Not needed to have two different contents.

 

Browser Support

  • IE >= 6
  • Firefox >= 3
  • Safari >= 4
  • Google Chrome >= 4
  • Opera >= 9.5

Requirements: None
Demo:http:/ / tcorral. github. com/ Cutter. js/ #examples
License: MIT License



The Web Dev Zone is brought to you in partnership with Mendix. Better understand the aPaaS landscape and how the right platform can accelerate your software delivery cadence and capacity with the Gartner 2015 Magic Quadrant for Enterprise Application Platform as a Service.

Topics:

Published at DZone with permission of Hirvesh Munogee , DZone MVB .

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}