There has been a few posts on a similar subject. However none of the solutions are working in my case.
I have managed to add a new button with the code below but when I click on it nothing happens.
<script>
var editor = new Jodit('#editor', {
buttons: [
'bold',
{
iconURL: './icons/icon.png',
exec: function (editor) {
return editor.create.fromHTML('text to insert');
}
}
]
});
What am I doing wrong?
Next step will be to add a new button with a dropdown of several insert options, each of these to insert a different html text in the editor.
Anybody has done that?
Just look jodit documentation
Corrections of your code: