collective.outputfilters.tinymceaccordion


Namecollective.outputfilters.tinymceaccordion JSON
Version 1.0a7 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_time2024-04-29 05:44:41
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)


- [README](#readme)
  - [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)

> [!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.

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

Create a configfile `instance.yaml` for cookiecutter

```yaml
default_context:
  initial_user_name: "admin"
  initial_user_password: "admin"
  wsgi_listen: "localhost:8080"
  db_storage: direct
  debug_mode: true
  verbose_security: true
```

create a plone instance via pip

install cookiecutter, if needed

```bash
python3 -m venv ./venv
source venv/bin/activate
pip install mxdev
pip install -r requirements-mxdev.txt
pip install cookiecutter
cookiecutter -f --no-input --config-file instance.yaml https://github.com/plone/cookiecutter-zope-instance
deactivate
```

## Start the instance

```bash
source venv/bin/activate
runwsgi -v instance/etc/zope.ini
deactivate
```

Instance Shutdown via `ctrl+c`

## Format and Linting

use tox

`tox -e init`

`tox -e format`

`tox -e lint`

## Testing

use tox

`tox -e init`

`tox -e test`

debugging a single test, run the a specific test

`zope-testrunner -pvc --test-path=./src -t FilterFunctionalTest`


# Contributors

- 1letter


# Changelog

<!-- towncrier release notes start -->

## 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/2c/db/44411b29bb4295792ccb30a4afb48419cd6e69b8238aee8dfe45c187fe98/collective.outputfilters.tinymceaccordion-1.0a7.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- [README](#readme)\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\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## 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\nCreate a configfile `instance.yaml` for cookiecutter\n\n```yaml\ndefault_context:\n  initial_user_name: \"admin\"\n  initial_user_password: \"admin\"\n  wsgi_listen: \"localhost:8080\"\n  db_storage: direct\n  debug_mode: true\n  verbose_security: true\n```\n\ncreate a plone instance via pip\n\ninstall cookiecutter, if needed\n\n```bash\npython3 -m venv ./venv\nsource venv/bin/activate\npip install mxdev\npip install -r requirements-mxdev.txt\npip install cookiecutter\ncookiecutter -f --no-input --config-file instance.yaml https://github.com/plone/cookiecutter-zope-instance\ndeactivate\n```\n\n## Start the instance\n\n```bash\nsource venv/bin/activate\nrunwsgi -v instance/etc/zope.ini\ndeactivate\n```\n\nInstance Shutdown via `ctrl+c`\n\n## Format and Linting\n\nuse tox\n\n`tox -e init`\n\n`tox -e format`\n\n`tox -e lint`\n\n## Testing\n\nuse tox\n\n`tox -e init`\n\n`tox -e test`\n\ndebugging a single test, run the a specific test\n\n`zope-testrunner -pvc --test-path=./src -t FilterFunctionalTest`\n\n\n# Contributors\n\n- 1letter\n\n\n# Changelog\n\n<!-- towncrier release notes start -->\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.0a7",
    "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": "",
            "digests": {
                "blake2b_256": "4ffae2abaabf6b126efe49655caa43c24b77954d4b5901cb7b435f61ee22cdad",
                "md5": "7c0f87a1747dd030ee732f10f65d0b3f",
                "sha256": "965ac1bb495c72b89e068122f71007f9738c1fe0480f5a4b269610ab684fb317"
            },
            "downloads": -1,
            "filename": "collective.outputfilters.tinymceaccordion-1.0a7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7c0f87a1747dd030ee732f10f65d0b3f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 19707,
            "upload_time": "2024-04-29T05:44:39",
            "upload_time_iso_8601": "2024-04-29T05:44:39.538764Z",
            "url": "https://files.pythonhosted.org/packages/4f/fa/e2abaabf6b126efe49655caa43c24b77954d4b5901cb7b435f61ee22cdad/collective.outputfilters.tinymceaccordion-1.0a7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2cdb44411b29bb4295792ccb30a4afb48419cd6e69b8238aee8dfe45c187fe98",
                "md5": "801fc42c4d301c79e94f89fea1212dfd",
                "sha256": "ef7d52b431d31db9c0719dbf2ee04c6998d9565033276f90b580bc3588bb5893"
            },
            "downloads": -1,
            "filename": "collective.outputfilters.tinymceaccordion-1.0a7.tar.gz",
            "has_sig": false,
            "md5_digest": "801fc42c4d301c79e94f89fea1212dfd",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 16401,
            "upload_time": "2024-04-29T05:44:41",
            "upload_time_iso_8601": "2024-04-29T05:44:41.584774Z",
            "url": "https://files.pythonhosted.org/packages/2c/db/44411b29bb4295792ccb30a4afb48419cd6e69b8238aee8dfe45c187fe98/collective.outputfilters.tinymceaccordion-1.0a7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-29 05:44:41",
    "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.79506s