How to extend Editor's buttons (create, edit, delete)

How to extend Editor's buttons (create, edit, delete)

JuergenJuergen Posts: 9Questions: 3Answers: 0

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

  • kthorngrenkthorngren Posts: 21,336Questions: 26Answers: 4,951

    Here is an example of a duplicate button. See this example for creating custom buttons.

    Kevi

  • JuergenJuergen Posts: 9Questions: 3Answers: 0

    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

  • colincolin Posts: 15,240Questions: 1Answers: 2,599
    Answer ✓

    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

  • JuergenJuergen Posts: 9Questions: 3Answers: 0

    Thanks Colin.

Sign In or Register to comment.