• Resolved rdtowe

    (@rdtowe)


    I am developer for a university and one of our department editors has entered a support ticket to us to fix a “bug” that they have encountered.

    The user states that when they highlight text within a WYSIWYG and then drag and drop the text elsewhere within the WYSIWYG, then TinyMCE is adding random span tags to the HTML.

    We do not think that this is actually a bug, rather a bad editing practice. If the user COPIES or CUTS and PASTES the content, the span tags are not added.

    I just wanted to reach out to others users to see if they have encountered this and to get feedback we can provide to editors in other departments that this may not be best practice and to use Control C, Control X, and Control V instead.

    Here is a link to a video that the user put together to display what he is encountering.

    https://www.screencast.com/t/b3lL15lLBci2”

    • This topic was modified 6 years ago by rdtowe.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    I can confirm my editor does the same thing. The editor does this in order to maintain any applied formatting that might be applied to the dragged content. Unfortunately, the drop algorithm is not smart enough to know that the drop location already has identical formatting. The resulting appearance should appear the same whether the spans were added or not. They sure can make for messy HTML in the text view though. Even worse, in heavily edited content, the tags are likely to get corrupted since users cannot see the underlying HTML they are editing.

    I’ve no idea why the cut/paste algorithm can figure out there is no formatting change but drag/drop cannot.

    In any case, it might be a good idea to get out of the drag/drop habit. I wouldn’t go so far as to say it’s a bad habit, but the default editor in WP will change to the Gutenberg editor in version 5.0. Gutenberg currently does not support drag/drop editing within text blocks at all. We can drag/drop blocks to our heart’s content. I don’t know if adding support is planned or not. Also, site owners can choose to stay with tinyMCE if they want, there will be a plugin available to do this. Due to a reduced user base and greater focus on Gutenberg, we can expect improvements to tinyMCE such as having drag/drop behave the same as cut/paste to be very slow in coming.

    Thread Starter rdtowe

    (@rdtowe)

    Thank you for that reply. We have instructed our end editors to refrain from dragging and dropping content, and instead use Copy/Cut and Paste.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘TinyMCE Editor: Drag and Drop issue’ is closed to new replies.