CSS Class for Button in editor.edit()

CSS Class for Button in editor.edit()

c25xec25xe Posts: 2Questions: 1Answers: 0

Hey guys,
I have a duplicate button as in this example: Duplicate button
also works great

But I want to give the button in the editor a CSS class
I tried so

editor
  .edit(table.rows({ selected: true }).indexes(), {
    title: '<h5 class="modal-title">Duplicate record</h5>',
    buttons: {
      text: "Duplicate",
      className: "btn-success",
    },
  })
  .mode("create");

The button is also displayed correct with the CSS class but the button has no function anymore. (no error in the console)

any ideas?

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,143Questions: 1Answers: 2,586
    Answer ✓

    Yep, you'll need an action function for that button to submit the data - something like this : http://live.datatables.net/jonusexa/1/edit . Before, it would've just done that automatically.

    Colin

  • c25xec25xe Posts: 2Questions: 1Answers: 0

    Thanks a lot! - Works great

    Jan

This discussion has been closed.