Skip to main content

Add BBCode in the site and transform it.

Project description

collective.bbcodesnippets provides pervasive, generic and extensible BBCode Markup integration for Plone.

Functionality

collective.bbcodesnippets replaces BBCode in the whole generated HTML output. BBCode snippets can be placed everywhere in the site.

At transform time at the end of the chain, before or after Diazo (configurable), the output is parsed and all BBCode will be replaced.

The BBCode parser only replaces configured BBCode snippets. At the control panel all registered BBCodes are listed to be activated. By default all codes are inactive.

This package utilizes the excellent bbcode package from Dan Watson to parse and replace. We register all default formatters as named utilities which are used as factories for the formatter using the Zope Component Architecture (ZCA). Custom parsers can be provided by registering an own named utility. Before parsing at transform time new Parser is created using the configured adapters only.

Further features:

  • The Plone toolbar got a new menu to copy BBCode templates for the active BBCodes.

  • TinyMCE got a new menu to insert BBCode templates.

  • There is a demo page with all activated BBCodes at the portal root under @@bbcodesnippets-demo.

  • A boolean index has_bbcodes got added to the portal_catalog. Content with active or inactive BBCcodes in any of their text or richtext Dexterity schema fields are indexed True.

Installation

Install collective.bbcodesnippets by adding it to your buildout:

[buildout]

...

eggs =
    collective.bbcodesnippets

and then running buildout.

Afterwards (re)start Plone, go to the controlpanel and install the addon.

Then there is a conrol-panel to control the allowed BBcodes.

Source Code

Build and Test

The sources are in a GIT DVCS with its main branches at github.

We’d be happy to see many forks and pull-requests to make collective.bbcodesnippets even better.

Contributors

Thanks to St. Pölten University of Applied Sciences for initial funding.

History

1.0.0 (2022-03-31)

  • Fix: prevent to transform \n to 
 by replacing it with nothing. [jensens]

  • Fix: Remove all settings on uninstall. [jensens]

1.0.0b1 (2021-06-07)

  • Added boolean index to catalog together with indexer detecting BBCodes in content. [jensens]

1.0.0a5 (2021-05-25)

  • Use lxml.html.fromstring for inner HTML parsing to ingest not-so-perfect HTML. [jensens]

  • Remove explicit order of registration - it has no effect. [jensens]

1.0.0a4 (2021-05-23)

  • Enable explicit order of registration. [jensens]

1.0.0a3 (2021-05-19)

  • Explicit load plone.restapi ZCML to have profile available.

1.0.0a2 (2021-05-19)

  • Explicit load plone.rest ZCML to have “plone.service” defined. [jensens]

1.0.0a1 (2021-05-19)

  • Fix package configuration [jensens]

1.0.0a0 (2021-05-18)

  • Initial work [jensens]

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.bbcodesnippets-1.0.0.tar.gz (23.8 kB view hashes)

Uploaded source

Built Distribution

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page