Skip to content
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

Cannot drag shortcaked shortcode #51

Closed
chdenat opened this issue Nov 15, 2014 · 14 comments
Closed

Cannot drag shortcaked shortcode #51

chdenat opened this issue Nov 15, 2014 · 14 comments

Comments

@chdenat
Copy link

chdenat commented Nov 15, 2014

Hello

Maybe a feature request more than a bug.
When a shortcode have been inserted, it is not possible to move it through the article like images.

@danielbachhuber
Copy link
Contributor

Yep, I don't believe we've addressed this yet.

@roborourke
Copy link
Contributor

The same is true for all mce views such as embeds so maybe this is something for core. Only reliable way to do it would be to extend the toolbar buttons with a handle you can click and drag.

@danielbachhuber
Copy link
Contributor

Only reliable way to do it would be to extend the toolbar buttons with a handle you can click and drag.

This sounds like a good way to do it :) Something we could trial in Shortcake, and then contribute upstream.

@danielbachhuber
Copy link
Contributor

Related core ticket: https://core.trac.wordpress.org/ticket/28003

@roborourke
Copy link
Contributor

My initial experiments were unsuccessful - image dragging is a special case
in contenteditable elements. Dragging nested elements only really worked
with inline content. I'll add my findings to the trac ticket.

I'm going to try a different approach with simple up/down arrows.

Robert O'Rourke
mobile: +447816329424
skype: *rob.o.rourke
*web:
röb.co

@mattheu
Copy link
Contributor

mattheu commented Dec 23, 2014

I've spoken to a few people about this - and it is indeed an issue in the core implementation of media views.

I know that there is a plan to support views like this in TinyMCE - perhaps this is a reason that they have been reluctant to try and work around this in WordPress?

@kraftner
Copy link
Contributor

Has anything changed now that https://core.trac.wordpress.org/ticket/28003 has landed?

@danielbachhuber
Copy link
Contributor

Has anything changed now

Not sure. Can you test?

@kraftner
Copy link
Contributor

Sorry, wasn't clear. I have tested and although images with captions can be dragged now nothing has changed for shortcake views. What I was wondering is if this might have paved the way as I haven't understood yet where exactly the problem is.

@chdenat
Copy link
Author

chdenat commented Dec 10, 2015

@danielbachhuber I'm sure not ;)

@westonruter
Copy link
Contributor

This seems like a key feature that would make the shortcodes behave like content blocks.

@mehigh
Copy link
Contributor

mehigh commented Apr 1, 2016

Cutting and pasting (using keyboard shortcuts) is the only possible way to reorder in the visual editor view. Drag and dropping using a Move icon in the tooltip would definitely provide a better user experience.
Any pointers on whether there are any in-progress developments which might touch this feature? Or this needs to be fully developed on top of the plug-in?

@mattheu
Copy link
Contributor

mattheu commented Apr 1, 2016

Yeah I'd love to support this. Thanks for linking to that trac ticket - it looks like it specifically refers to images being dragged, and will not just automatically work for all MCE views.

However could be a good start - i'll look into this.

@mattheu
Copy link
Contributor

mattheu commented Jun 26, 2016

🎉 Support for this has landed in core as of https://core.trac.wordpress.org/changeset/37446!

@mattheu mattheu closed this as completed Jun 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants