In the course of developing Drupal for the DP, we’ve been fortunate that we’ve had to write very little (themeing layer excepted) from scratch. Chalk it up to to the strength and robustness of the Drupal community that nearly every function we wanted, there was a module for.

One module that I did have to write from scratch was to replicate a function from College Publisher. After copy and pasting a story into CP’s interface, there was a button run all that doubled the line breaks, among other things.

Drupal wraps text separated by two line breaks with <p> tags and uses the <br /> tag to in-between text separated by one line break. By default, text copied out of InCopy only has one line break between paragraphs.

When Sean Blanda posted about the Temple News moving to Wordpress, this was one of the 6 problems he laid out as having. All this does is convert those single line breaks into two. Not substantial enough to really commit to Drupal.org, but dead useful since we don’t want to futz around with a WYSIWYG editor.

Download the Run All Module

It should be relatively simple to turn into a TinyMCE plug-in for Wordpress too, but that will come after midterms and all the other work facing me.