collective.outputfilters.tinymceaccordion


Namecollective.outputfilters.tinymceaccordion JSON
Version 1.1.0 PyPI version JSON
download
home_pagehttps://github.com/collective/collective.outputfilters.tinymceaccordion
SummaryAddon for Plone 6 - Plone Outputfilter to transform TinyMCE Markup to Bootstrap5 Accordion
upload_time2025-07-15 04:52:59
maintainerNone
docs_urlNone
author1letter
requires_python>=3.8
licenseGPL version 2
keywords python plone cms
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            # README

![Plone Meta Workflow](https://github.com/collective/collective.outputfilters.tinymceaccordion/actions/workflows/meta.yml/badge.svg "Plone Meta Workflow") [![codecov](https://codecov.io/gh/collective/collective.outputfilters.tinymceaccordion/graph/badge.svg?token=Fr1Av8spXo "Code Coverage Workflow")](https://codecov.io/gh/collective/collective.outputfilters.tinymceaccordion) ![PyPI - Versions from Framework Classifiers](https://img.shields.io/pypi/frameworkversions/plone/collective.outputfilters.tinymceaccordion)


- [Who need this addon?](#who-need-this-addon)
- [Registry Settings](#registry-settings)
- [Install Addon via buildout](#install-addon-via-buildout)
- [Install Addon via pip](#install-addon-via-pip)
- [Install a Testenvironment](#install-a-testenvironment)
- [Start the instance](#start-the-instance)
- [Format and Linting](#format-and-linting)
- [Testing](#testing)
- [Testing with coverage](#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

```html
<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

```html
<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***

```json
{
    "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](https://getbootstrap.com/docs/5.3/components/accordion/#always-open).

## 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`


# Contributors

- 1letter
- mauritsvanrees


# Changelog

<!-- towncrier release notes start -->

## 1.1.0 (2025-07-15)


### New features:

- If environment variable `ACCORDION_ALWAYS_OPEN` is 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.robotframework` for testing.
  We don't have robot tests.  This avoids running `rfbrowser init` on 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

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/collective/collective.outputfilters.tinymceaccordion",
    "name": "collective.outputfilters.tinymceaccordion",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "Python Plone CMS",
    "author": "1letter",
    "author_email": "1letter@gmx.de",
    "download_url": "https://files.pythonhosted.org/packages/9a/5c/417011caf7021c6f2cc6e9a448582970f372a0105f951c2b2aefab70b669/collective_outputfilters_tinymceaccordion-1.1.0.tar.gz",
    "platform": null,
    "description": "# README\n\n![Plone Meta Workflow](https://github.com/collective/collective.outputfilters.tinymceaccordion/actions/workflows/meta.yml/badge.svg \"Plone Meta Workflow\") [![codecov](https://codecov.io/gh/collective/collective.outputfilters.tinymceaccordion/graph/badge.svg?token=Fr1Av8spXo \"Code Coverage Workflow\")](https://codecov.io/gh/collective/collective.outputfilters.tinymceaccordion) ![PyPI - Versions from Framework Classifiers](https://img.shields.io/pypi/frameworkversions/plone/collective.outputfilters.tinymceaccordion)\n\n\n- [Who need this addon?](#who-need-this-addon)\n- [Registry Settings](#registry-settings)\n- [Install Addon via buildout](#install-addon-via-buildout)\n- [Install Addon via pip](#install-addon-via-pip)\n- [Install a Testenvironment](#install-a-testenvironment)\n- [Start the instance](#start-the-instance)\n- [Format and Linting](#format-and-linting)\n- [Testing](#testing)\n- [Testing with coverage](#testing-with-coverage)\n\n> [!IMPORTANT]\n> This addon works only with Plone 6.1 and higher\n>\n> For Plone 6.0 use plone.staticresources >= 2.2.x\n\n## Who need this addon?\n\nThis addon provide a transform for HTML Markup. TinyMCE Plugin \"accordion\" insert the following Markup\n\n```html\n<details class=\"mce-accordion\" open=\"open\">\n<summary>Accordion Summary 1</summary>\n<p>Text in the collapsible 1</p>\n</details>\n<details class=\"mce-accordion\" open=\"open\">\n<summary>Accordion Summary 2</summary>\n<p>Text in the collapsible 2</p>\n</details>\n```\n\nit will be transformed to Bootstrap5 Accordion Markup\n\n```html\n<div class=\"accordion\" id=\"acc-bs0\">\n <div class=\"accordion-item\">\n  <h2 class=\"accordion-header\" id=\"heading-0-0\">\n   <button aria-controls=\"collapse-0-0\" aria-expanded=\"true\" class=\"accordion-button\" data-bs-target=\"#collapse-0-0\" data-bs-toggle=\"collapse\" type=\"button\">\n    Accordion Summary 1\n   </button>\n  </h2>\n  <div aria-labelledby=\"heading-0-0\" class=\"accordion-collapse collapse show\" data-bs-parent=\"#acc-bs0\" id=\"collapse-0-0\">\n   <div class=\"accordion-body\">\n    <p>Text in the collapsible 1</p>\n   </div>\n  </div>\n </div>\n <div class=\"accordion-item\">\n  <h2 class=\"accordion-header\" id=\"heading-0-1\">\n   <button aria-controls=\"collapse-0-1\" aria-expanded=\"true\" class=\"accordion-button\" data-bs-target=\"#collapse-0-1\" data-bs-toggle=\"collapse\" type=\"button\">\n    Accordion Summary 2\n   </button>\n  </h2>\n  <div aria-labelledby=\"heading-0-1\" class=\"accordion-collapse collapse show\" data-bs-parent=\"#acc-bs0\" id=\"collapse-0-1\">\n   <div class=\"accordion-body\">\n    <p>Text in the collapsible 2</p>\n   </div>\n  </div>\n </div>\n</div>\n```\n\n## Registry Settings\n\nSome values in registry records are set:\n\n`\"plone.plugins\"`\n\n- accordion\n\n`plone.valid_tags`\n\n- summary\n- details\n- button\n\n`plone.custom_attributes`\n\n- open\n- type\n- data-bs-toggle\n- data-bs-target\n- aria-expanded\n- aria-controls\n- aria-labelledby\n- data-bs-parent\n\nEnable 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.\n\n***Menu***\n\n```json\n{\n    \"insert\": {\n        \"title\": \"Insert\",\n        \"items\": \"link media | template hr | accordion\"\n    },\n}\n```\n\nPlease check the TinyMCE controlpanel that the values are set correct.\n\n## Optional configuration\n\nIf environment variable `ACCORDION_ALWAYS_OPEN` is set, accordion items stay open when another item is opened.\nSee [Bootstrap accordion documentation](https://getbootstrap.com/docs/5.3/components/accordion/#always-open).\n\n## Install Addon via buildout\n\nadd `collective.outputfilters.tinymceaccordion` to your egg section in buildout.cfg\n\n## Install Addon via pip\n\n`pip install collective.outputfilters.tinymceaccordion`\n\n## Install a Testenvironment\n\nrun `make build`\n\n## Start the instance\n\nrun `make start`\n\n## Format and Linting\n\nrun `make check`\n\n## Testing\n\nrun `make test`\n\n## Testing with coverage\n\nrun `make test-coverage`\n\n\n# Contributors\n\n- 1letter\n- mauritsvanrees\n\n\n# Changelog\n\n<!-- towncrier release notes start -->\n\n## 1.1.0 (2025-07-15)\n\n\n### New features:\n\n- If environment variable `ACCORDION_ALWAYS_OPEN` is set, accordion items stay open when another item is opened.\n  @mauritsvanrees #16\n\n## 1.0.1 (2025-06-24)\n\n\n### Bug fixes:\n\n- Fix updating registry records when installing.\n  Previously, our configuration changes could be gone after a restart.\n  If your accordions don't work, you can deactivate and activate this add-on to fix it.\n  @mauritsvanrees #15\n\n\n### Tests:\n\n- Do not require `plone.app.robotframework` for testing.\n  We don't have robot tests.  This avoids running `rfbrowser init` on each test run.\n  @mauritsvanrees \n\n## 1.0.0 (2025-06-23)\n\n\n### Internal:\n\n- Update README @1letter readme\n- Update configuration files @plone \n\n\n### Tests:\n\n- move tests to pytest @1letter pytest\n\n## 1.0a7 (2024-04-29)\n\n\n### Internal:\n\n- Update README @1letter #7\n\n## 1.0a6 (2024-04-28)\n\n\n### Internal:\n\n- Update README @1letter \n\n## 1.0a5 (2024-04-28)\n\n\n### Internal:\n\n- Update README @1letter \n\n## 1.0a4 (2024-04-28)\n\n\n### Internal:\n\n- remove unused files @1letter \n\n## 1.0a3 (2024-04-28)\n\n\n### Internal:\n\n- Update configuration files @plone \n\n## 1.0a3 (unreleased)\n\n\n- Nothing changed yet.\n\n\n## 1.0a2 (2024-04-19)\n\n- Initial release. @1letter\n",
    "bugtrack_url": null,
    "license": "GPL version 2",
    "summary": "Addon for Plone 6 - Plone Outputfilter to transform TinyMCE Markup to Bootstrap5 Accordion",
    "version": "1.1.0",
    "project_urls": {
        "Homepage": "https://github.com/collective/collective.outputfilters.tinymceaccordion",
        "PyPI": "https://pypi.org/project/collective.outputfilters.tinymceaccordion/",
        "Source": "https://github.com/collective/collective.outputfilters.tinymceaccordion",
        "Tracker": "https://github.com/collective/collective.outputfilters.tinymceaccordion/issues"
    },
    "split_keywords": [
        "python",
        "plone",
        "cms"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "1fa3473046d547c0cb3aeb1d4728b45f84eb09aea7eabb5dce23804f1b1bbfb2",
                "md5": "224f4abc664340b0994bb579bbc2eeb4",
                "sha256": "57b5de794abce24d28b43d003652314ac51b5a3f15464008b3ce8ba558229e34"
            },
            "downloads": -1,
            "filename": "collective_outputfilters_tinymceaccordion-1.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "224f4abc664340b0994bb579bbc2eeb4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 18789,
            "upload_time": "2025-07-15T04:52:58",
            "upload_time_iso_8601": "2025-07-15T04:52:58.089909Z",
            "url": "https://files.pythonhosted.org/packages/1f/a3/473046d547c0cb3aeb1d4728b45f84eb09aea7eabb5dce23804f1b1bbfb2/collective_outputfilters_tinymceaccordion-1.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "9a5c417011caf7021c6f2cc6e9a448582970f372a0105f951c2b2aefab70b669",
                "md5": "9975db5a6c61966a2ef1aaf4caab2e84",
                "sha256": "84e47c51b471c85dbc719e3bfcc72c6dd741e3c46decaa1d93e2eff06d8e5862"
            },
            "downloads": -1,
            "filename": "collective_outputfilters_tinymceaccordion-1.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "9975db5a6c61966a2ef1aaf4caab2e84",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 19199,
            "upload_time": "2025-07-15T04:52:59",
            "upload_time_iso_8601": "2025-07-15T04:52:59.522650Z",
            "url": "https://files.pythonhosted.org/packages/9a/5c/417011caf7021c6f2cc6e9a448582970f372a0105f951c2b2aefab70b669/collective_outputfilters_tinymceaccordion-1.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-15 04:52:59",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "collective",
    "github_project": "collective.outputfilters.tinymceaccordion",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [],
    "tox": true,
    "lcname": "collective.outputfilters.tinymceaccordion"
}
        
Elapsed time: 0.55064s