obsidian-drag-and-drop-blocks
obsidian-drag-and-drop-blocks copied to clipboard
pre selecting multiple lines of text and then using the drag handle to move it all
Submitted by TFTHacker via Discord
Question 3: I have the following 3 lines:
- a
- b
- c
I select with my mouse lines a through c. I then drag and drop them. but only line A is dragged to new location.
My response: You cannot multi-select. It only drags the single block. Ignores selected text. Obisidan native allows you to drag selected text so you can just do it without using my drag handle.
This is probably doable. Probably can do a check at the beginning if there is text selected when starting the drag to use that instead of grabbing just the current line of the drag handle. Overall I should revamp my code so I am just tracking the editor position line(s) start and end that is being dragged, and where it is landing. So then I can be more dynamic with features like these.