Playing around with technology

Introducing CodeMirror OSF mode

Shownotes in the context of Podcasts are a simple but suitable method to supply related information to the listener. One approach is the Open Show Notes Format which covers a few application fields.

As it name says, CodeMirror OSF mode, is a mode for CodeMirror which highlights OSF documents. The mode is thought to address people that usually write or edit Shownotes.


This CodeMirror mode is available once you have included the osf.js file in your document. Then, all you have to do is to select this mode in codemirror. Somehow like this:

<script type="text/javascript">
  var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
  lineNumbers: true,
  mode: 'text/x-osf',
  lineWrapping: true

The official CodeMirror site features lots of information about how to use CodeMirror.



CodeMirror OSF mode is released under the MIT license.

Fork on GitHub   Download from GitHub

Article info