A mootools 1.3.X plugin

Never desired to truncate html string for example to show only the first part of an article and place a "read all" button to link the whole content? Sure, but what about having this done only by javascript? Here comes mooReadAll, it may cut html text clientside, after the whole document is rendered.

mooReadAll is a mootools plugin designed to cut html strings of one or a group of elements preserving the html formatting (without truncate tags).
Requires mootools-core >= 1.3 and the drag module from mootools-more >= 1.3.
The "read all" link is customizable together with its action, in particular there are 4 possible actions:

  1. inplace: the entire text is shown inside the same element
  2. layer: the whole text is shown in a layer (draggable, resizable, text-resizeable) lightbox style
  3. link: the read label links to another page
  4. callback: the read all label calls a javascript function passing the element, a custom parameter and the object context.

If choosing the layer type action then a title may be provided using html5 data attributes, look the documentation and demo page for more info about this.
Some or all html tags may be removed so that is possible for example to remove images which often take too much space in many home page layouts.

mooReadAll has been tested with:

  • windows:
    - google chrome 12
    - firefox 5.0
    - internet explorer 9.0, 8.0, 7.0
  • linux:
    - chromium
    - firefox >= 3.6
  • mac:
    - firefox >= 4 

If you find errors, bugs or simply have some annotations or advises, please comment here or submit them to the project page hosted on github.

mootools forge documentation demo download