Preformatted plugin

Basic usage

Wraps/unwraps your code with <pre><code> tags.

Read preformatted plugin documentation

Some code to wrap

$('#editor') .trumbowyg({ btns: [ 'viewHTML', 'preformatted' ] });

Then check the HTML, code is now wrapped into pre + code tags!

The code


$('#editor')
.trumbowyg({
    btns: [
        'viewHTML',
        'preformatted'
    ]
});
            

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>