Thank you so much for the answer. I looked at your plugin, but unfortunately, this does not suit me for two reasons: 1) It would be difficult for the content author to add standard styles to each table. 2) This component doesn't change styles for tables. Perhaps it only works with text.
I would also suggest to go with simpler approach. The plugin actual works along with element selector, from RTE you have to select table element then you have to apply style, otherwise classes will be applied to text node.