plugins/lineheight/trumbowyg.lineheight.js
function buildDropdown(trumbowyg) {
        var dropdown = [];

        $.each(trumbowyg.o.plugins.lineheight.sizeList, function(index, size) {
            trumbowyg.addBtnDef('lineheight_' + size, {
                text: trumbowyg.lang.lineheights[size] || size,
                hasIcon: false,
                fn: function(){
                    trumbowyg.saveRange();
                    var text = trumbowyg.getRangeText();
                    if (text.replace(/\s/g, '') !== '') {
                        try {
                            var parent = getSelectionParentElement();
                            $(parent).css('lineHeight', size);
                        } catch (e) {
                        }
                    }
                }
            });
            dropdown.push('lineheight_' + size);
        });

        return dropdown;
    }
function buildDropdown(trumbowyg) {
        var dropdown = [];

        $.each(trumbowyg.o.plugins.lineheight.sizeList, function(index, size) {
            trumbowyg.addBtnDef('lineheight_' + size, {
                text: trumbowyg.lang.lineheights[size] || size,
                hasIcon: false,
                fn: function(){
                    trumbowyg.saveRange();
                    var text = trumbowyg.getRangeText();
                    if (text.replace(/\s/g, '') !== '') {
                        try {
                            var parent = getSelectionParentElement();
                            $(parent).css('lineHeight', size);
                        } catch (e) {
                        }
                    }
                }
            });
            dropdown.push('lineheight_' + size);
        });

        return dropdown;
    }
function buildDropdown ( trumbowyg ) { var dropdown = [ ] ; $ . each ( trumbowyg . o . plugins . lineheight . sizeList , function ( index , size ) { trumbowyg . addBtnDef ( 'lineheight_' + size , { text : trumbowyg . lang . lineheights [ size ] || size , hasIcon : false , fn : function ( ) { trumbowyg . saveRange ( ) ; var text = trumbowyg . getRangeText ( ) ; if ( text . replace ( / \s / g , '' ) !== '' ) { try { var parent = getSelectionParentElement ( ) ; $ ( parent ) . css ( 'lineHeight' , size ) ; } catch ( e ) { } } } } ) ; dropdown . push ( 'lineheight_' + size ) ; } ) ; return dropdown ; }
Build the dropdown
Build the dropdown