support contenteditable elements

Hi,

I added support for contenteditable elements (not only textareas).
The code needs some cleanup. But I thought I create a pull request anyway to get your feedback and ask if you are even considering merging this?

cheers
Dominik