Attention

This document was written for an old version of Plone, Plone 3, and was last updated 1169 days ago.

To learn how to upgrade to the current version of Plone, read the upgrade manual.

Enable Markdown, Textile and ReStructured Text Support

by John Samuel Anderson last modified Mar 10, 2009 11:33 PM
Add the right eggs to buildout.cfg and set the right settings in Control Panel → Markup.

Purpose

Your content authors want to use the text markup formats Markdown and/or Textile, rather than Plone's WYSYWIG editors. Fine. Here's how to give them what they want.

Prerequisities

This was tested on:

  • Plone 3.2
  • CMF 2.1.2
  • Zope (Zope 2.10.6-final, python 2.4.5, linux2)
  • Python 2.4.5 (#1, Mar 6 2009, 11:25:56) [GCC 4.1.2 20071124 (Red Hat 4.1.2-42)]
  • PIL 1.1.6

Step by step

Installation

Install the Markdown and textile eggs. Note that the textile 2.0.1 is the last textile version compatible with Python 2.4, and therefore with Plone 3.x.

If you're using buildout, add this to your buildout.cfg file:

  1. NOTE: ReStructured text does not need additional eggs.
    [buildout]
    ...
    eggs +=
        Markdown
        textile==2.0.1
  2. Re-run buildout.

Configuration through the web

  1. In your site's Control Panel, navigate to Markup (/@@markup-controlpanel).
  2. Select:









  3. Click Save.

Configuration using GenericSetup

You can set these options in the propertiestool.xml file in a policy product. Something like this:

<?xml version="1.0"?>
<object name="portal_properties" meta_type="Plone Properties Tool">
  <object name="site_properties" meta_type="Plone Property Sheet">
    <property name="forbidden_contenttypes" remove="true" />
    <property name="forbidden_contenttypes" type="lines">
      <element value="text/structured"/>
      <element value="text/x-rst"/>
      <element value="text/plain"/>
      <element value="text/plain-pre"/>
      <element value="text/x-python"/>
      <element value="text/x-web-intelligent"/>
    </property>
  </object>
</object>

Further information

One more tricky bit of information:

For users to enter content in a markup language, they will need to click "Edit without the visual editor" which is below the text content area. Only then will the text-format dropdown be enabled.


Contribute

Something wrong or out of date? Anybody can edit or create a new article in the knowledge base. Simply create an account on this site, log in, and click the Edit button to contribute.