-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dragging content from sidebar #10298
Comments
Also related #1511 |
@SofiaSousa I can think of a few cases where I'd use this. Would be very interested to see how you accomplished this. |
I guess this is a question not about introducing it into core, but providing a cleaner way to accomplish a similar result. Currently, some messy overrides are needed to make it work. |
We've tried 2 different options for drag and drop from the sidebar scenario:
StoryPage is using Gutenberg@3.2.0 via gutenberg-js@1.2.1 (where we implemented the overrides). Many changes have been made in code so far, but the flow is the same. First we've created the PostItemDraggable, which was inspired in BlockDraggable component, and added a list of those items to sidebar. 1. Inserting a new block
2. Updating an existing block
|
Has there been any movement on this? It appears As an aside, the |
We believe that the proposal in this issue can be achieved in the current Gutenberg API by using the following two components:
The video below shows how to drag and drop an element wrapped in a 205f97af8a3a6bcce013710d6e4a1558.mp4Specifically, the implementation should be as follows:
I would like to close this issue, but please leave a comment if there is anything that can't be achieved with the current API. |
Since gutenberg editor already has the drag and drop feature for blocks inside the page, I think would be great to apply the same concept for the content of the blocks.
Here is an example for what we have in StoryPage (which is a prototype using standalone-gutenberg editor)
(Try it here https://storypage.devz.no/pages/new?template=minerva)
I'm available to share our approach and hope we can have a produtive discuss. What are your thoughts about this?
The text was updated successfully, but these errors were encountered: