Fountain Plugin

Fountain is a markup language like Markdown but for Screenwriters. I augmented some existing work on the format and modified it to work with Statamic as a plug-in. Why do this? Well Statamic already supports editing in standard text editor in Markdown, why not add Fountain to the list.

The fountain add-on for Statamic that has been adapted from a PHP conversion by Christoph Mewes in 2013 of fountain.js by Matt Daly in 2012.

PHP is a better choice for a bunch of reasons and it allows anyone to write in the standard ‘fountain’ format and with minimal work can integrate with Statamic.

Warning: I have modified this script to suit my own purposes that I believe will also suit a great many other peoples that don’t want to spend hours messing around. However as modifications have been made to the original fountain.js script in the conversion to PHP, and then again by myself, note that 100% compatibility with the Fountain format is not guaranteed. Use at your own risk, folly or foible. Okay not foibles so much.

To use create a directory called ‘fountain’ in the _add-ons subdirectory and place both pi.fountain.php and fountain.css in that directory.

In whichever theme you are using, insert into the section of the default.html file the following:

To interpret a block of text immediately prior open/close with the Statamic tag as follows:

My GitHub repository with the fountain plugin.