Module Monday: Emphasis

Provide deep-link URLs for long form content

For sites that publish long form content, social sharing poses a problem. While users can easily link to a node's full page, linking to a specific chunk of text in that node's body is usually impossible. You could have authors add manual anchor tags throughout each article and give users visible links to each paragraph… Or, you could install the Emphasis module.

Admin interface screenshot

Emphasis is a simple field formatting that can be applied to any text field on a Drupal entity. It automatically generates a unique HTML ID for each paragraph tag, then adds a copy of the New York Times' Emphasis javascript library to the page. When it's active, users can click on individual paragraphs and sentences to receive a "deep linking" URL. When another user visits the page using that URL, they'll see the very same text highlighted.

Module in action

Setup and configuration for the Emphasis module couldn't be simpler: download the module, download the Javascript library from the Times' GitHub page, and select the formatter for the fields of your choice. It's unobtrusive, only appearing when users double-tap the shift key. If your site features lots of long articles, tools like Emphasis can dramatically increase its attractiveness to link-happy bloggers and social network users. Check it out!

Get in touch with us

Tell us about your project or drop us a line. We'd love to hear from you!