Talk to us today

Sri Lanka
  • 40/2/21, Chakkindarama Rd,
    Ratmalana,
    10390,
    Sri Lanka
Connect
Close

SilverStripe Markdown Revisited

SilverStripe Markdown Revisited

SilverStripe CMS ships with one of the most advanced WYSIWYG editors, TinyMCE. TinyMCE is a great editor tool, if you are more into letting the user understand how the document will exactly look like. But if you are more concerned of the content and what appears where, and want to limit the user from adding custom CSS or HTML which can result in breaking the layout of a webpage, markdown is a great markup language to use. Its simple and its being used among many content focused websites, such as Wikipedia, StackExchange, GitHub and Reddit

We came across the idea of using Markdown editors when we worked on Arts and culture websites. One of the main things we wanted to avoid is the custom text formatting which can happen when copying content from a word processor to the HTML Editor Field (HtmlEditorField) in SilverStripe. And if the above takes place it will effect badly on the layout of the final webpage also any other pages embedding that content in. Like unclosed divisions can break a whole page, or having inline CSS can add various colors, font families, font weights etc.  

As a solution we wanted to use Markdown as an editor. And we started making a module and tried sharing the code. But we never get to maintain the open source version of it. We do understand that open source does not mean you just share the code, but you do provide active support, and releases for the code you share. We couldn't do that for the last 2 years, with the module we had there on github. However as the new SilverStripe 4 version is nearly getting stable, we are prepared to properly manage the missing Markdown editor field for SilverStripe. 

The below is a preview of our Markdown editor for SilverStripe.

Markdown preview

Welcome to use our code, you can install it via composer, or fork our github repo. Also if there are any issues you notice with the module or suggestions send us an issue on git.