How to create module for Jodit Editor

You can write your own module for Jodit. For example create Dummy module, which will insert some code in editor Create file Dummy.js with this content

Jodit.modules.Dummy = function (editor) {
    this.insertDummyImage = function (w, h, textcolor, bgcolor) {
        var image = Jodit.modules.Dom.create('img', '', editor.ownerDocument);
        image.setAttribute('src', 'http://dummyimage.com/' + w + 'x' + h + '/' + (textcolor || '000') + '/' + (bgcolor || 'fff'));
        editor.selection.insertNode(image);
        editor.setEditorValue(); // for syncronize value between source textarea and editor
    };
};

You need include this file after include jodit.min.js

<link type="text/css" rel="stylesheet" href="build/jodit.min.css">
<script type="text/javascript" src="build/jodit.min.js"></script>
<script type="text/javascript" src="Dummy.js"></script>

No you can use this module. For example will append button in toolbar

new Jodit('#editor', {
    buttons: ['bold', 'italic', {
        iconURL: 'images/dummy.png',
        tooltip: 'insert Dummy Image',
        exec: function (editor) {
            editor.dummy.insertDummyImage(100, 100, 'f00', '000');
        }
    }],
    events: {
        afterInit: function (editor) {
            editor.dummy = new Jodit.modules.Dummy(editor);
        }
    }
});

Or you can use your mode like this:

var editor = new Jodit('#textareaid');
editor.getInstance('Dummy').insertDummyImage(100, 100, 'f00', '000');

That's all. You can try this example here