Create plugin

This example shows how to create a simple plugin. Click on the content to see the plugin button on the toolbar. See more about how to create plugins.


    <!DOCTYPE html>
        <title>Redactor X</title>
        <meta charset="utf-8">
        <!-- css -->
        <link rel="stylesheet" href="/your-dist-path/redactorx.min.css" />
        <!-- element -->
        <textarea id="entry">
        <!-- js -->
        <script src="/your-dist-path/redactorx.min.js"></script>
        <!-- plugin code with fontawesome icon -->
        RedactorX.add('plugin', 'myplugin', {
            start: function() {
      'mybutton', {
                    title: 'My Button',
                    icon: '<i class="fa fa-superpowers"></i>',
                    command: 'myplugin.toggle'
            toggle: function(params, button) {
                alert('Button Toggle');
        <!-- call -->
        RedactorX('#entry', {
            plugins: ['myplugin']