Adds ability to paste text (ctrl/cmd+v) into chat

Style nit: use `var` for declarations.