Skip to main content

Turns the Plone 'Description' field into Richtext/HTML

Project description

Introduction

Adds the new HTML-formatable textfield richdescription content types can use.

There are two behaviors provided:

collective.richdescription

The single richdescription field.

collective.richdescription.basic

A drop-in replacement for plone.basic. This is what you usually want: Disable plone Basic and enable this.

collective.richdescription.optionaltitle

A special replacement for plone.basic, but with an non-required title. To be used i.e. with file and image.

  • When the field is saved, the contents are also stored in the classic dublincore description field, but without html-formatting.

  • A metadata index is provided, so that richdescription can be read directly from catalog brains.

  • A module global collective.richdescription.behavior.PATTERN_OPTIONS is used to configure the widget, It comes with a reduced set of features and can be patched if more are needed. There is no control panel yet (contributions are welcome).

There is no folder_listing or similar template yet. If you want to have HTML formatted descriptions in folder_listing use something like this:

<tal:block
  tal:define="item_description item/richdescription|nothing;
              item_description python:item_description or item.Description;">
  <p class="akaDescription"
    tal:condition="item_description"
    tal:content="structure item_description">DESCRIPTION</p>
</tal:block>

Warning

Although there are no big issues with this package, use it at your own risk! The description field wasn’t meant to hold HTML data. People may tend to write long essays in the description field, which is not what you want, probably. Some use cases require this functionality though, so have fun.

Migration?

There should be no need for a specific migration step. When no richdescription field is available for a content type, it falls back to the normal description field. When saving a content type, the richdescription field is set and the catalog’s metadata richdescription column is filled.

Compatibility

Tested with Plone 6

Author

Johannes Raggam <johannes@raggam.co.at> Peter Holzer <peter.holzer@agitator.com> Jens Klein <jk@kleinundaprtner.at>

Source Code and Contributions

If you want to help with the development (reporting, improvement, update, bug-fixing, …) of collective.richdescription this is a great idea!

Please file any issues or ideas for enhancement at the issue tracker.

The code is located in the github collective.

You can clone it or get access to the github-collective and work directly on the project.

Maintainer is Johannes Raggam and the BlueDynamics Alliance developer team. We appreciate any contribution and if a release is needed to be done on pypi, please just contact one of us dev@bluedynamics dot com

Changelog

4.0.0 (2026-05-30)

  • Move to use native namespaces. [erral]

3.0.3 (2026-05-29)

  • Register the @@description view for all behaviors. [erral]

3.0.2 (2024-01-19)

  • Fix the customized @@description view which wasn’t applied. The marker interface for IRichDescription behaviors was recently changed. This fix now shows the formatted description in views. [thet]

  • Configure and cleanup with plone/meta. [thet]

3.0.1 (2023-10-19)

  • Add textindexer for title and description. [agitator]

  • Update pattern options for tinymce 5.10.2 in Plone 6. [agitator]

3.0.0 (2022-03-23)

  • Add collective.richdescription.title as a drop in replacement for plone.basic. Also add collective.richdescription.optionaltitle as a variant for file/image. [jensens]

  • Add patchable PATTERN_OPTIONS global to collective.richdescription.behavior in order to be able to set reduced options here (default). [jensens]

  • Python 3 compatibility - remove Archetypes support. [agitator]

2.0 (2014-11-11)

  • Cleaning up. [jensens]

  • Add Dexterity support. [thet]

  • Refactoring. [thet]

1.0.1 (2014-06-13)

  • Metadata update. [thet]

1.0 (2012-11-07)

  • Initial release [thet]

1.0pre

  • When no description is set, return a BaseUnit as fallback. Fixes AttributeError, where original_encoding was tried to accessed on a string value. [thet]

  • Register the skins folder for any theme. [thet]

  • Initial version on 2010-10-05 for sfd.at.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

collective_richdescription-4.0.0.tar.gz (22.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

collective_richdescription-4.0.0-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

Details for the file collective_richdescription-4.0.0.tar.gz.

File metadata

File hashes

Hashes for collective_richdescription-4.0.0.tar.gz
Algorithm Hash digest
SHA256 e7c5c5b09c285e13870c3b90e935fc92deabc1f08075ffe4ff3836819c14d94b
MD5 b9d6ddf782c327e9713682aad5639d1a
BLAKE2b-256 d81f9407cbcae4654e5564bfde5091d86dff654f96766bed526339caf81f943b

See more details on using hashes here.

File details

Details for the file collective_richdescription-4.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for collective_richdescription-4.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f157b86e63ffbc1f35995582bb8048a9dc50b7f573071b0e546e3e2f4b182055
MD5 0403c29d9272fe690703f8ff3858fc8c
BLAKE2b-256 1c549a1c976429d425e573b36202648323abc0ebd8a6b7b300bb9d2d6989e780

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page