How to enable the theme editor cap for an editor role?

I am trying to add/enable the theme editor for the editor role. The editor role by default doesn’t have the option to manage theme options, so I addded this to functions.php:

// get the the role object
$role_object = get_role( 'editor' );

// add $cap capability to this role object
//$role_object->add_cap( 'edit_theme_options' );
$role_object->add_cap( 'manage_options' );

But still, I don’t see the theme editor option. In the end, I want the theme editor to be the only submenu option.

Any suggestions?

Solutions Collecting From Web of "How to enable the theme editor cap for an editor role?"