Line height plugin

Basic usage

User can change the line-height in Trumbowyg.

Read font size plugin documentation

Change the size!

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Possimus, aliquam, minima fugiat placeat provident optio nam reiciendis eius beatae quibusdam!

The code


$('#editor')
.trumbowyg({
    btns: [
        ['lineheight']
    ]
});
            

Custom font sizes

Change the font!

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Possimus, aliquam, minima fugiat placeat provident optio nam reiciendis eius beatae quibusdam!

The code


$('#editor-custom-font-sizes')
.trumbowyg({
    btns: [
        ['lineheight']
    ],
    plugins: {
        lineheight: {
            sizeList: [
                '14px',
                '18px',
                '22px'
            ]
        }
    }
});
            

Setup

In head tag


            

At the end of body


<!-- Import jQuery -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/vendor/jquery-3.3.1.min.js"><\/script>')</script>