Add new MCE button for toggle specific cell background color

I have found a great tutorial about making a custom button to the tinymce.
http://qnimate.com/adding-buttons-to-wordpress-visual-editor/

You can just follow this guide and copy all of it. Don’t forget to activate your new plugin in the plugin menu (in admin panel).

Then you can just change the code inside index.js and especially in the

ed.addCommand("green_command", function() {

For making the background of the selected cell toggle (on/off) you just change the code like this:

//button functionality.
ed.addCommand("green_command", function() {
ed.formatter.register('termin_format', {
selector: 'td',
styles: { backgroundColor: '#adf2a7'},
});
ed.formatter.toggle('termin_format');

        });