HTML Excerpt

Warning: This plugin has't been updated in over 54 years. It may no longer be maintained.

What you can do to help:

Provides a global function for truncating HTML

Last updated

This plugin is intended as a tool for developers to use as a dependency.  Note that it inherently does nothing by itself.

Sometimes you need to retain styling and markup in an excerpt, and elgg_get_excerpt doesn't cut it

This small plugin provides a global function providing a full HTML excerpt


$params = array(

    'html' => $input_html,

    'length' => 250,

    'type' => 'chars', // also 'words'

    'elipses' => '...'


$excerpt = html_excerpt($params);


The resulting excerpt with trim textual elements to the resulting length and return valid rebuilt html.

**Note: the excerpt generation is comparably slow process.  Ideally excerpts should be cached after being generated and not generated on the fly repeatedly for multiple views on a page.

Arck Interactive

You imagine. We create. We develop custom social networks, content management systems and other rich internet applications. We help entrepreneurs and creative agencies breathe life into their visions. Let's start a conversation!

Project Info


  • Category: Misc
  • License: GNU General Public License (GPL) version 2
  • Updated: 1970-1-1
  • Downloads: 401
  • Recommendations: 1

Other Projects

View Arck Interactive's plugins