Last week one of my colleague had an use case for readmorejs integration with Drupal. First of all I was surprised there wasn’t any module for it. So I helped her with a quick and dirty fix. It was to include readmore js and initialization js file in template.php. I know one should not touch template.php but when you have limited hours that’s what you end up with.
So on a nice Saturday morning, I decided to solve this problem more drupal way. So I decided created a module which defines a readmore field formatter. It turned out to be a very simple module than what I had imagined. Thanks to google and some awesome bloggers ( and drupal.org docs ) I was able to get it working within few hours of work.
You can download it from: https://www.drupal.org/project/readmore_formatter
Screenshot for field formatter configuration:
Blog that helped me with this module: http://www.metaltoad.com/blog/drupal-7-tutorial-creating-custom-formatters
cheers..