Something kind of cool with copy and paste


(Brian) #1

Perhaps someone has seen this before, but if one copies an element, symbol whatever, from one’s stage and pastes in a text file one gets the source code that is output. Saw it by accident, but it is a much more efficient way of inspecting what one is building on the fly.


(Jonathan Deutsch) #2

Yes, this is one of the undocumented features that has been around for a while :slight_smile:. I tend to use it a lot for debugging, but kept it in since I figure others might find it useful for getting code out of Hype.

The one thing to note is that it is just a dump of the live DOM, so it produces Safari-centric code and might not be fully compatible with other browsers (webkit prefixing and such).


(Greg) #3

Just for fun, paste it to the innerHTML of the object.


(Mark Hunte) #4

yep it is cool. I some time use it when I want to clone something and need the code.[quote=“jonathan, post:2, topic:9744”]

The one thing to note is that it is just a dump of the live DOM, so it produces Safari-centric code and might not be fully compatible with other browsers (webkit prefixing and such).
[/quote]

did not realise that. good to know.