You are here: Home Members bscott Website Plone Notes

Plone Notes

by Benjamin Scott last modified Jan 10, 2006 10:58 PM
Various random bits of information about how Plone works

Plone Page Formatting

    Plone has several ways it can interpret your text, and a several ways it will let you edit your text.

Text Format

    It appears that Plone "Page" objects are always stored as plain text internally.  When you view a Page, what Plone does to render said text is controlled by the "Text Format" setting of the page.  You can change the Text Format using a drop down list that appears when you edit the page.

    It is important to understand that changing the Text Format after a document has been created will not re-write the text already entered.  Changing the drop-down just changes how Plone interprets the text.  Think changing a file extension.  You can rename a file from foo.html to foo.pdf, and that might cause Acrobat to open instead of Firefox, but the contents of the file will still be the same (and most likely not display properly).

HTML
 If the Text Format is HTML, then Plone basically just assumes the text is already marked up using HTML, and passes it through to the browser more-or-less "as is".  So set HTML if you're entering HTML tags yourself (or pasting some other HTML document into Plone).
Structured Text
If the Text Format is Structured Text, Plone treats the text as a typical ASCII document, with certain conventions that trigger special interpretation by Plone.  It's very similar to TWiki markup, if you've every used that.  I found this external page to be very helpful: Structured Text Cheat Sheet
reStructured Text
This very similar to Structured Text, but with slightly different syntax.  Basically, some people decided Structured Text wasn't quite what they wanted, and came up with this variation on it.  reStructuredText Cheat Sheet

Text Editor

    The above explains how Plone interprets your text one you've entered it.  What about options for entering the text (or content, as Plone calls it) in the first place?  These are controlled mainly via your Plone Preferences page.

Basic HTML Textarea
 This uses a plain old TEXTAREA element in an HTML form, just like we've all seen on a million-and-one blogs, wiki's, and so on.  You enter ASCII text, and it gets saved, and that's about all there is to it.  You can use any of the various text formats (HTML, Structured, etc.) with this.  It's very portable, but a little harder for newbies to figure out.
Kupu
Kupu is a WYSIWYG HTML editor implemented using JavaScipt and DHTML.  It works pretty well in some browsers, not so much in others.  While the GUI toolbar is nice, using Kupu does limit you to entering HTML only, as Kupu does not understand (re)structured text.  Kupu is the default on this site.
External editor
Using a special MIME type and a browser plugin, Plone will let you invoke any external editor you want to edit Plone text content.  You can use Emacs, vi, or whatever.  You have to check a checkbox on your prefs page to enable this (and install the plugin, of course).  Once enabled, just click the new icon at the top of the page (looks like a pencil with an arrow encircling it).
 

Document Actions
Filed under: ,