djangocms-text-ckeditor
djangocms-text-ckeditor copied to clipboard
text_enabled plugins inside ckeditors refer to the same plugin instance after copy&paste - instead new instances should be created
How to reproduce:
- create some text and use some of the text as anchor for a link plugin. Save the TextPlugin. Then edit it again.
- copy and paste the paragraph below the existing paragraph.
- you now have two paragraphs with two link plugins. Save the TextPlugin.
- Doubleclick the second link plugin and change the href (select another page). Save the TextPlugin.
- Check the first link, it links now to the updated page of the second link plugin as well. However it should still be linking to its original page.
Just stumbled into this as well. I would describe it as a severe issue. Personally I would disable the ability of copying the text or inserting database-related plugins altogether.
This issue means that users can silently corrupt the existing published pages. And if (and that's a big if) they discover the issue by checking the old pages accidentally, they're most likely going to try to fix the old pages, thus simultaneously breaking the new pages.
Looks like something as editor.pasteFilter.disallow('.cms-plugin')
can help.
Hardly a great solution, but at least it won't be possible to corrupt pages without noticing it.
This issue caused another weird behavior resulting in losing data. Once a subplugin is copied from one TextPlugin to another, using copy-paste in editor mode, copying the latter TextPlugin removes the subplugin from its tags. This is caused by replace_plugin_tags, which removes any tags it can't find in its subplugins.
Can be closed because https://github.com/django-cms/djangocms-text-ckeditor/pull/569 and https://github.com/django-cms/djangocms-text-ckeditor/pull/572 were merged and released in v5
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This will now be closed due to inactivity, but feel free to reopen it.