add automatic code selection

Related to #53 and #52.

This is my first stab. Super simple - when you click in the code snippet area, the whole block is selected.