Is there a already a plug-in out there that will auto-magically check all content for double spaces after a period and force double spacing if not there? I know there are some out there like Low's find and replace. I was just hoping for an automated "drop in" type of work without the need to add tags to all the templates. Reason being, there are 973 templates in this inherited build. :(

It is in the process of a redesign/rebuild, but that is still some time out and this is a "need".



Unfortunately, and I use that statement loosely, I don't believe so. In fact, some of the WYSIWYG editors may even remove double spacing after a period. Why? Because, technically speaking its bad practice. Everyone who follows or attempts to follow the standard rules of typography, The Complete Manual of Typography: A Guide to Setting Perfect Type by James Felici) will point perhaps call it 'wrong'. But, historically, there are or were a number of reasons for the double space after period. But for the last 50-60 years that hasn't been true.

Double space after a period is works great with typewriters, because of monospacing. It's not a a good guideline for print and digital content. You just make more work for anyone who needs to parse and clean your data in the future. We clean a lot of data and our first step is:

Step 1: Remove all erroneous extra spacing. This process removes double spaces after periods, tab-spaces (actual tab then space, like \t.. (the tab is a predefined space, random double or triple spaces between words and paragraphs, etc.

I could go all parseable text-Nazi on you, but I'll just say, when you are creating content that may need to be digital reused in different ways, including potentially switching content management systems sometime in the future, it's best not to have formatting that could hinder portability. Both HTML and XML have whitespace folding rules, which double spaces after periods can break.

That said, if your client is insistent that double-spacing after a period is required, I can see two possible options:

  1. Building your own Type Toolbar. You could probably modify CKEditor and force the issue of double spacing, or
  2. Modify CSS. It's probably possible to modify your CSS file so that a period space, resembles a double space, thereby keeping cleaner typographer, but still satisfying the clients visual requirements. I'm not certain if you can directly target the '.', but if not maybe   and   spacing.

There was an interesting conversation of Stackoverflow regarding a similar topic, a project requiring double spacing. It mentions the possibility of adding <span> to your sentences or .&nbsp; (period-nonbreaking space-space).

Eric Meyer, quoted from a 2006 list serve email, argues that:

p {white-space: pre-wrap;}

could work as a solution. Practically everything suggested is pretty much a hack, since its not standardly supported, anywhere that I know of. Your own toolbar editor would probably give you the best implementation and control over this. I'd assume you would just need to modify one of the javascript files in CKEditor, to change . space to . &emsp; which would give you the two space look, but still retain a single space for future proofing, word wrapping, alignment issues, etc.

| improve this answer | |
  • I agree with all said, but I don't get to make the call. I'll look into modifying ckedit on this install for now and see if that might work. – W3bGuy Jan 17 '13 at 18:02
  • If you are not interested in making your own add-on using CKEditor, you could also go the easier route of trying to hack one of the current WYSIWYG editors, like WYGWAM: pixelandtonic.com/wygwam or Espresso putyourlightson.net/expresso I think the biggest issue will be targeting, the period-space. It should be doable, but so many things use '.' programmatically, that I wonder if it would cause problems. – nonprofit_tech Jan 17 '13 at 19:44

First off... Thanks for the insight nonprofit_tech...

I never followed up on this. I apologize. I ended up suggesting a process injection for them when they would like to use double spaces in fields that "auto-corrected" them by adding a ' ' followed by a normal keyboard space.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.