- Issue created by @SteffenR
- Merge request !4Issue #3531221: allow pasting from clipboard with paragraph action links β (Open) created by SteffenR
- π¦π²Armenia hhvardan
Marking this issue as "active" due to ongoing updates. Thanks for your work on it.
Adding a βPaste belowβ option to the paragraph actions menu β doesnβt align well with how the module is designed. The actions menu is meant for operations on that paragraph (like edit, duplicate, remove), while the clipboard is global and not linked to any specific paragraph. This could be confusing to users.
If youβd like to add this feature, please consider making it optional (behind a setting, like "add above") so site builders can choose whether to enable it.
- π¬π§United Kingdom andy inman Gloucestershire, UK
@steffenr I took a quick look at what you have implemented. I think it's a great idea - I agree that it's useful.
I also agree with hhvardan - it may be confusing to users. One suggestion - a small change that I think would help: make the menu item show Insert from clipboard rather than the current text, Paste clipboard below. Reason: for me, this better explains what is going to happen. Sure, it doesn't tell you whether the item will be pasted above or below, but I don't think that matters much. Insertion below the currently selected paragraph is what I would expect.
- Copy to clipboard - makes sense already.
- Paste from clipboard - not good - I might expect it to replace the current item.
- Insert from clipboard - Makes sense to me.
- π©πͺGermany SteffenR Germany
@hhvardan @andy inman Thx for your feedback.
Renaming the action is not "a big deal" and as you mentioned, it sounds like it makes more sense.I've updated the MR accordingly. Maybe you can have an idea, how to get the configured third party setting within the hook_paragraphs_widget_actions_alter.
I did some debugging, but it looks like there is no easy way (besides loading the whole widget configuration) to get the widget config/ third party settings in here. - π©π°Denmark blymemikkel Copenhagen
I think the patch has an issue if the entity has more than one paragraphs field.
Let's say you have a paragraphs field on a node where certain paragraphs are allowed and another field where some other paragraphs are allowed. If you then click "Copy to clipboard", it shouldn't be possible to insert a paragraph if the field doesn't allow it.
What happens now is that the entire paragraphs field is being replaced by the field that the inserted-paragraph belongs to.