How to make w3schools like tryit editor?

How to make w3schools like tryit editor?

Just copy and paste this code and modify it according to your needs.