assets/scripts/medium-insert/insert-plugin.js
function (addon) {
			var editor = $.fn.mediumInsert.settings.editor,
					buttonLabels = (editor && editor.options) ? editor.options.buttonLabels : '';

			var buttons;
			if($.fn.mediumInsert.settings.enabled) {
			buttons = '<div class="mediumInsert-buttons">'+
						'<a class="mediumInsert-buttonsShow">+</a>'+
						'<ul class="mediumInsert-buttonsOptions medium-editor-toolbar medium-editor-toolbar-active">';
			} else {
			buttons = '<div class="mediumInsert-buttons hide">'+
						'<a class="mediumInsert-buttonsShow">+</a>'+
						'<ul class="mediumInsert-buttonsOptions medium-editor-toolbar medium-editor-toolbar-active">';
			}

			if (Object.keys($.fn.mediumInsert.settings.addons).length === 0) {
				return false;
			}

			if (typeof addon === 'undefined') {
				$.each($.fn.mediumInsert.settings.addons, function (i) {
					buttons += '<li>' + addons[i].insertButton(buttonLabels) + '</li>';
				});
			} else {
				buttons += '<li>' + addons[addon].insertButton(buttonLabels) + '</li>';
			}

			buttons += '</ul></div>';

			return buttons;
		}
function (addon) {
			var editor = $.fn.mediumInsert.settings.editor,
					buttonLabels = (editor && editor.options) ? editor.options.buttonLabels : '';

			var buttons;
			if($.fn.mediumInsert.settings.enabled) {
			buttons = '<div class="mediumInsert-buttons">'+
						'<a class="mediumInsert-buttonsShow">+</a>'+
						'<ul class="mediumInsert-buttonsOptions medium-editor-toolbar medium-editor-toolbar-active">';
			} else {
			buttons = '<div class="mediumInsert-buttons hide">'+
						'<a class="mediumInsert-buttonsShow">+</a>'+
						'<ul class="mediumInsert-buttonsOptions medium-editor-toolbar medium-editor-toolbar-active">';
			}

			if (Object.keys($.fn.mediumInsert.settings.addons).length === 0) {
				return false;
			}

			if (typeof addon === 'undefined') {
				$.each($.fn.mediumInsert.settings.addons, function (i) {
					buttons += '<li>' + addons[i].insertButton(buttonLabels) + '</li>';
				});
			} else {
				buttons += '<li>' + addons[addon].insertButton(buttonLabels) + '</li>';
			}

			buttons += '</ul></div>';

			return buttons;
		}
function ( addon ) { var editor = $ . fn . mediumInsert . settings . editor , buttonLabels = ( editor && editor . options ) ? editor . options . buttonLabels : '' ; var buttons ; if ( $ . fn . mediumInsert . settings . enabled ) { buttons = '<div class="mediumInsert-buttons">' + '<a class="mediumInsert-buttonsShow">+</a>' + '<ul class="mediumInsert-buttonsOptions medium-editor-toolbar medium-editor-toolbar-active">' ; } else { buttons = '<div class="mediumInsert-buttons hide">' + '<a class="mediumInsert-buttonsShow">+</a>' + '<ul class="mediumInsert-buttonsOptions medium-editor-toolbar medium-editor-toolbar-active">' ; } if ( Object . keys ( $ . fn . mediumInsert . settings . addons ) . length === 0 ) { return false ; } if ( typeof addon === 'undefined' ) { $ . each ( $ . fn . mediumInsert . settings . addons , function ( i ) { buttons += '<li>' + addons [ i ] . insertButton ( buttonLabels ) + '</li>' ; } ) ; } else { buttons += '<li>' + addons [ addon ] . insertButton ( buttonLabels ) + '</li>' ; } buttons += '</ul></div>' ; return buttons ; }
Return insert buttons optionally filtered by addon name

@param {string} addon Addon name of addon to display only
@return {void}
Return insert buttons optionally filtered by addon name