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
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
Michael Graf, FH St.Pölten - Idea and Use Case
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file collective.bbcodesnippets-1.0.0.tar.gz
.
File metadata
- Download URL: collective.bbcodesnippets-1.0.0.tar.gz
- Upload date:
- Size: 23.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 311e064267ccfe7fcd70f24e4b46b4712a7a5d978f6695bda9138dc9cdc44acf |
|
MD5 | a92aaa32cd2e7f9c6ef8eef6384e208f |
|
BLAKE2b-256 | da7073851b2816a8b782a8d8f196a5568bdfe0f6800e3ed6b52716b7825ab0c7 |
File details
Details for the file collective.bbcodesnippets-1.0.0-py2.py3-none-any.whl
.
File metadata
- Download URL: collective.bbcodesnippets-1.0.0-py2.py3-none-any.whl
- Upload date:
- Size: 32.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf5e9c1078f2c3c904092e97049b35dd32928017afa3f273e60ce9c4eaaa5e46 |
|
MD5 | 2569716af9405802587274d446fbca64 |
|
BLAKE2b-256 | b7a9d4bec71473be483389b7e201639004213a8d2bdd797221a11e703a9ed940 |