How to Add Custom Button to Text(HTML) Editor and NOT Visual Editor

I followed this tutorial which is adding a custom button into Visual Editor as it is supposed to. But this is not adding the button into the Text(HTML) Editor. Can you please let me know how I can add my own button into Text(HTML) Editor only (or at least both! and not Visual one)

function enqueue_plugin_scripts($  plugin_array) {     //enqueue TinyMCE plugin script with its ID.     $  plugin_array["green_button_plugin"] =  plugin_dir_url(__FILE__) . "index.js";     return $  plugin_array; }  add_filter("mce_external_plugins", "enqueue_plugin_scripts");  function register_buttons_editor($  buttons) {     //register buttons with their id.     array_push($  buttons, "green");     return $  buttons; }  add_filter("mce_buttons", "register_buttons_editor");