README
- Who need this addon?
- Registry Settings
- Install Addon via buildout
- Install Addon via pip
- Install a Testenvironment
- Start the instance
- Format and Linting
- Testing
- Testing with coverage
[!IMPORTANT] This addon works only with Plone 6.1 and higher
For Plone 6.0 use plone.staticresources >= 2.2.x
Who need this addon?
This addon provide a transform for HTML Markup. TinyMCE Plugin "accordion" insert the following Markup
<details class="mce-accordion" open="open">
<summary>Accordion Summary 1</summary>
<p>Text in the collapsible 1</p>
</details>
<details class="mce-accordion" open="open">
<summary>Accordion Summary 2</summary>
<p>Text in the collapsible 2</p>
</details>
it will be transformed to Bootstrap5 Accordion Markup
<div class="accordion" id="acc-bs0">
<div class="accordion-item">
<h2 class="accordion-header" id="heading-0-0">
<button aria-controls="collapse-0-0" aria-expanded="true" class="accordion-button" data-bs-target="#collapse-0-0" data-bs-toggle="collapse" type="button">
Accordion Summary 1
</button>
</h2>
<div aria-labelledby="heading-0-0" class="accordion-collapse collapse show" data-bs-parent="#acc-bs0" id="collapse-0-0">
<div class="accordion-body">
<p>Text in the collapsible 1</p>
</div>
</div>
</div>
<div class="accordion-item">
<h2 class="accordion-header" id="heading-0-1">
<button aria-controls="collapse-0-1" aria-expanded="true" class="accordion-button" data-bs-target="#collapse-0-1" data-bs-toggle="collapse" type="button">
Accordion Summary 2
</button>
</h2>
<div aria-labelledby="heading-0-1" class="accordion-collapse collapse show" data-bs-parent="#acc-bs0" id="collapse-0-1">
<div class="accordion-body">
<p>Text in the collapsible 2</p>
</div>
</div>
</div>
</div>
Registry Settings
Some values in registry records are set:
"plone.plugins"
- accordion
plone.valid_tags
- summary
- details
- button
plone.custom_attributes
- open
- type
- data-bs-toggle
- data-bs-target
- aria-expanded
- aria-controls
- aria-labelledby
- data-bs-parent
Enable the accordion toolbar button in the Menu JSON Structure in the TinyMCE Controlpanel. Per default this addon enable the accordion option in the insert menu section.
Menu
{
"insert": {
"title": "Insert",
"items": "link media | template hr | accordion"
},
}
Please check the TinyMCE controlpanel that the values are set correct.
Optional configuration
If environment variable ACCORDION_ALWAYS_OPEN is set, accordion items stay open when another item is opened.
See Bootstrap accordion documentation.
Install Addon via buildout
add collective.outputfilters.tinymceaccordion to your egg section in buildout.cfg
Install Addon via pip
pip install collective.outputfilters.tinymceaccordion
Install a Testenvironment
run make build
Start the instance
run make start
Format and Linting
run make check
Testing
run make test
Testing with coverage
run make test-coverage
Update locale
run uvx i18ndude sync --pot ./src/collective/outputfilters/tinymceaccordion/locales/collective.outputfilters.tinymceaccordion.pot ./src/collective/outputfilters/tinymceaccordion/locales/*/LC_MESSAGES/collective.outputfilters.tinymceaccordion.po
Changelog
2.0.1 (2026-08-22)
Internal
- Move package metadata from
setup.pytopyproject.toml@plone - update config with plone.meta disable circular check in gh-actions @1letter
2.0.0 (2025-12-18)
Breaking changes:
- Switch to PEP 420 native namespace @1letter
Internal:
- update package with plone/meta @1letter
1.1.0 (2025-07-15)
New features:
- If environment variable
ACCORDION_ALWAYS_OPENis set, accordion items stay open when another item is opened. @mauritsvanrees #16
1.0.1 (2025-06-24)
Bug fixes:
- Fix updating registry records when installing. Previously, our configuration changes could be gone after a restart. If your accordions don't work, you can deactivate and activate this add-on to fix it. @mauritsvanrees #15
Tests:
- Do not require
plone.app.robotframeworkfor testing. We don't have robot tests. This avoids runningrfbrowser initon each test run. @mauritsvanrees
1.0.0 (2025-06-23)
Internal:
- Update README @1letter readme
- Update configuration files @plone
Tests:
- move tests to pytest @1letter pytest
1.0a7 (2024-04-29)
Internal:
- Update README @1letter #7
1.0a6 (2024-04-28)
Internal:
- Update README @1letter
1.0a5 (2024-04-28)
Internal:
- Update README @1letter
1.0a4 (2024-04-28)
Internal:
- remove unused files @1letter
1.0a3 (2024-04-28)
Internal:
- Update configuration files @plone
1.0a3 (unreleased)
- Nothing changed yet.
1.0a2 (2024-04-19)
- Initial release. @1letter
Metadata
Release files for collective.outputfilters.tinymceaccordion 2.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| collective_outputfilters_tinymceaccordion-2.0.1.tar.gz | 17.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| collective_outputfilters_tinymceaccordion-2.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 34.0 kB
Release files / collective_outputfilters_tinymceaccordion-2.0.1.tar.gz
| Download URL | collective_outputfilters_tinymceaccordion-2.0.1.tar.gz |
|---|---|
| Size | 17.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dac94b678e21d166a693f20125ee62cb621b954af7998d2a9fbc63f118931773
|
|
BLAKE2b-256 checksum How to use checksums |
d274e83e25c7b0bf93f6e795128acf21ddff8234ccf1511a9d40d4e9d003ce92
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / collective_outputfilters_tinymceaccordion-2.0.1-py3-none-any.whl
| Download URL | collective_outputfilters_tinymceaccordion-2.0.1-py3-none-any.whl |
|---|---|
| Size | 16.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
66ecb53d6a861486feb8958f93e362f72ede1079c3b69873d10f5aa3b5c6844f
|
|
BLAKE2b-256 checksum How to use checksums |
5188bc51a150cfe0c519696ab5ba0f1394c8057eff57a783c53b9b98eb7fdd9b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|