djangocms-cascade
djangocms-cascade copied to clipboard
Add feature: copy only plugins in clipboard
Summary
- Copy a plugin into the clipboard without making it a clipboard placeholder reference.
- Initialize data field identifier with clipboard content
- Reload the browser when restoring a clipboard to refresh it in the toolbar
Expected behaviour
it can be interesting sometimes in terms of ergonomics to copy only a plugin and its children that avoids several manipulations if we want to recover for example a container with a carousel inside or the carousel and his childs.
Actual behaviour
Currently only placeholders can be copied
I fully agree, that this would be really useful. One potential upcoming issue could be, that users get confused into which placeholders they will be allowed to copy their clipboard. Could this become a problem in the future?
Yes it's true that it can lead to confusion, we can add more recommendations in the doc:
if we copy a placeholder, the clipboard will be called "placeholer: clipboard" in the other case it will take the name of the first plugins copied, with the latter django-cms will identify in red or blue where he can position them with the drag and drop or with the active paste.
It is preferable to copy the entire tree from the placefolder rather than pieces of it because afterwards it is easier to paste it into another placeholder that will not solicitate a particular location.
if that is not suitable, I will understand that this PR is closed, because it will always be possible to copy the entire placeholder into a specific unpublished draft page, and recover what is desired. This will just generate a few more manipulations.
Another thing, concerning the images. They could be interesting to generate light images corresponding to the dimension of the images of origins. This would quickly know which images need to be replaced. For example: Parsing the clipboard before its registration, and adding the proportions info: "image": {"pk": 1, "model": "spin.Image"} => "image": {"pk": 1, "model": "filer.Image: 700x300"} And during the restore clipboard , if the image pk does not match the proportions, an image is generated and replaces: "image": {"pk": 1, "model": "filer.Image: 700x300"} => "image": {"pk": XXX, "model": "filer.Image"}
The generated images would be placed in folder that could be manually deleted once replaced.