The editor (TinyMCE) has plugins in modules/jrCore/contrib/tinymce/plugins. Don't add yours there: core updates replace that folder. Put each plugin in a module of its own instead.
xxCodeView.tinymce/plugin.min.js. One plugin per module._init():jrCore_register_module_feature('jrCore', 'editor_button', 'xxCodeView', 'on');The editor then loads the plugin for users in those quotas.
Which buttons the editor shows is set in the form_editor.tpl template: one in System Core, one in Site Builder. Override them in your skin as jrCore_form_editor.tpl and jrSiteBuilder_form_editor.tpl, or change them in the Template Editor, and add your plugin to the toolbar there. See Changing a Module's Template.
The Editor Embedded Media module is an example: its tinymce/plugin.min.js adds the Embed Local Media button.