#149: Improved Markup Support

Contents
  1. Motivation
  2. Assumptions
  3. Proposal
  4. Risks
  5. Progress log
  6. Participants
by Tom Lazar last modified Jan 21, 2010 07:26 AM

Creating a mechanism for adding support for additional markup languages such as Markdown and Textile for TextField fields and a site-wide policy for defining available and default formats.

Proposed by
Tom Lazar
Seconded by
Alexander Limi
Proposal type
User interface, Architecture, Process
Assigned to release
Repository branch
plip-149-markup-support
State
completed

Motivation

There's currently no way of setting the policy of what markup types are available in the site.

Two things should be possible:

  • Selecting available markup types
  • Selecting the default format

Preferrably, this should be available on a per-type basis, but even global selection is sufficient if per-type is too much work.

Ideally, this selection would be in the general types control panel, along with the workflow stuff and discussion on/off etc.

In addition, Markdown rocks and we want it ;-)

Assumptions


Proposal

  1. Create an example PortalTransformation for Markdown (following optilude's tutorial)
  2. Create site_properties for storing the default content type and a blacklist of undesired content types
  3. Modify Archetypes (specifically TextField class in Fields.py) and ATCT to honor those properties
  4. Create a UI for setting default type and allowed types in 'Portal Settings'.


Risks

by default both markdown and textile treat inline HTML 'as is' and leave it alone. for our use-case this is not acceptable. therefore we still need to implement some sort of tidying (or preferably just escaping) of any HTML that's entered.

Progress log

2006-04-25
Research and Discussion, especially with Benjamin Saller and Martin Aspeli
2006-04-26
first 'vertical prototype' on separate branches for ATContentTypes, PortalTransforms and MimetypesRegistry.
2006-09-12
picked up development at the St.-Augustin-Sprint. Cut new branches for the Products mentioned above and created initial version of the review bundle.
2006-09-13
migrated the old changes of ATContentTypes, PortalTransforms and MimetypesRegistry to the new branches.
Added necessary site properties in CMFPlone's default profile plus migration and test of those migrations.
Added tests for the merged util methods in Archetypes. Implemented necessary changes to Archetype's Field.py and the template that renders the format selection widget.
2006-09-14
Debugged yesterday's tests using ATSiteTestCase and ATDocument instead of Archetypes Dummy types, since they broke the tests. Performed additional clicktests in demo instance without encountering any errors ;-)
2006-09-15
Added control panel, migration, migration tests. Some minor refactoring in Archetypes.utils, general cleanup and submitted the bundle for review.

Participants

Tom Lazar