Closed working-name closed 6 years ago
What you are asking for is a feature request. I am assuming you wish to append a button to the existing toolbar?
This is not a feature I wish to implement into this project because to do not think it will provide much value and might even cause confusion. As it stands your code example is replacing the toolbar with one custom button. In the readme I provide an example on how to replace the toolbar and add a custom button. You can also use the example provided below.
var inscrybmde = new InscrybMDE({
toolbar: [
'undo', 'redo', '|', 'bold', 'italic', 'heading', '|', 'link',
{
name: "custom",
action: function customFunction(editor){
// Add your own code
},
className: "fa fa-star",
title: "Custom Button",
},
'table', 'horizontal-rule', '|', 'preview', 'side-by-side', 'fullscreen', '|', 'in-shortcuts', 'guide', '|',
],
});
I hope this will helps you out.
My apologies, I didn't realize I could just name the buttons and they'd be pulled. Thank you, that's exactly it.
I'm submitting a...
Reproduction steps
N/A
Notes
Came here from a thread complaining of the same thing for SimpleMDE where the toolbar buttons get wiped when you set a custom one. It seems incrybMDE has not handled that yet, either?
Also, as a side note, moving to
<button>
makes a dark theme look uggo.