firebug / firebug

Web Development Evolved - The Firebug you have known and loved
http://getfirebug.com/
1.35k stars 343 forks source link

Clone nodes when pasting content in the HTML panel #6344

Open fbugissues opened 9 years ago

fbugissues commented 9 years ago

Originally reported on Google Code with ID 6222

Currently, copying nodes stores the HTML code in the clipboard.

When copying/cutting nodes in the HTML panel, and then pasting it in the same document,
the nodes could be cloned.

Before implementing this, we should consider the advantages. I see two ones:
1. performance? (significant?)
2. keep the event listeners for the cloned nodes (if possible, note that EventBugs
allows to list the event listeners)
-> others?

If we can keep the event listeners for the cloned nodes, that should be an option in
the HTML panel.

Florent

Reported by florent.fayolle69 on 2013-01-28 13:09:22

fbugissues commented 9 years ago
For reference, the initial discussion about this started in issue 6339.

I guess cloning means to keep the cut nodes inside the structure until they are pasted?
Another (and IMO cleaner) approach is to reuse the clipboard for this. The clipboard
API is very powerful. So we could also copy the HTML plus DOM to it (besides the simple
HTML copy). Firebug will then interpret the "advanced copy" while text editors will
just interpret the HTML.

Sebastian

Reported by sebastianzartner on 2013-01-29 06:29:23