You mentioned using the class in your comment. You could try just adding
max-width:100%
to the css from the link you provided.
Or use jQuery:
$(document).ready(function(){
$('img.fulljust').each(function(){
if($(this).width() > 300){
$(this).css({
'width' : '100vw';
'position': 'relative';
'left': '50%';
'right': '50%';
'margin-left': '-50vw';
'margin-right': '-50vw';
});
}
});
});
EDIT:
I realized I didn't answer your actual question about adding buttons. Wordpress uses the TinyMCE editor which is built in javascript. So you have to create a plugin with a javascript file similar to the one found here: https://www.tinymce.com/docs/configure/content-formatting/#style_formats and add your own css styles to the code.
Then follow the Wordpress instructions for creating a TinyMCE plugin found here: https://codex.wordpress.org/TinyMCE_Custom_Buttons#Creating_an_MCE_Editor_Plugin