This is a plugin for Atto editor in Moodle that allows the user to paste content from several different rich formatting areas and either import the styling or import as unformatted text. To install, unpack to lib/editor/atto/plugins/pastespecial and visit the admin notifications page to install. Then add the button on that Atto toolbar settings page. The pastespecial settings page can be used to configure the allowed styles when importing formatting.
Pastespecial now "allows" tables (as of version 2016021100). It gets pasted in as normal without any handling. I STRONGLY encourage you to create your tables within Atto, but apparently not enough to artificially prohibit this.