How to extend Editor's buttons (create, edit, delete)
How to extend Editor's buttons (create, edit, delete)
Guys,
any way known how to extend the editor like:
$('#myTable').DataTable( {
buttons: [
{ extend: 'create_special', editor: myEditor },
{ extend: 'create', editor: myEditor },
{ extend: 'edit', editor: myEditor },
{ extend: 'remove', editor: myEditor }
]
} );
Regards,
Juergen
This question has an accepted answers - jump to answer
Answers
Here is an example of a duplicate button. See this example for creating custom buttons.
Kevi
Thanks Kevi for the quick response. I'm aware of the 'Duplicate example'. But it's not exactly what I was looking for.
I'm looking for an extension of the predefined actions/buttons of the editor to be able to use the API events like this:
editor.on( 'initCreate_special', function () {
// reduce the editor form of the create action to a bare minimum, etc
} );
Jürgen
There isn't a way to do that, but you can work around it like the example here. This is using a global variable, set in one of the create buttons, that allows the
initCreate
to determine which button was pressed.Colin
Thanks Colin.