Add onpaste handler for #303.