django-cms / djangocms-text-ckeditor

Text Plugin for django CMS using CKEditor 4
https://www.django-cms.org/en/repositories-plugins/
BSD 3-Clause "New" or "Revised" License
164 stars 186 forks source link

Feature/issue 648 unable to unlink #649

Closed jrief closed 9 months ago

jrief commented 9 months ago

This change can be used to reset the context of a plugin to its initial state. It works by evaluating the response code of a submitted plugin. If that is 204 – No Content, that initial text is restored and the plugin is removed. This allows authors of plugins to disconnect them using the already existing plugin editor.

I use it to unlink texts, but many other use cases then are possible as well.

codecov[bot] commented 9 months ago

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.03% :warning:

Comparison is base (10de493) 76.18% compared to head (4bf8b38) 76.15%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #649 +/- ## ========================================== - Coverage 76.18% 76.15% -0.03% ========================================== Files 20 20 Lines 932 931 -1 Branches 124 124 ========================================== - Hits 710 709 -1 Misses 196 196 Partials 26 26 ``` | [Files Changed](https://app.codecov.io/gh/django-cms/djangocms-text-ckeditor/pull/649?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=django-cms) | Coverage Δ | | |---|---|---| | [djangocms\_text\_ckeditor/cms\_plugins.py](https://app.codecov.io/gh/django-cms/djangocms-text-ckeditor/pull/649?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=django-cms#diff-ZGphbmdvY21zX3RleHRfY2tlZGl0b3IvY21zX3BsdWdpbnMucHk=) | `73.80% <100.00%> (-0.09%)` | :arrow_down: | | [djangocms\_text\_ckeditor/widgets.py](https://app.codecov.io/gh/django-cms/djangocms-text-ckeditor/pull/649?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=django-cms#diff-ZGphbmdvY21zX3RleHRfY2tlZGl0b3Ivd2lkZ2V0cy5weQ==) | `81.53% <100.00%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.