Fix pasteHook and add ability to toggle rich or text paste