RESTful Actions
RESTful Actions
I've been following the Basic initialisation example using the Editor plugin and I'm starting to customize my code for my own needs. The back end I'm using is a RESTful API, and has different methods to call for Create, Read, Update and Delete. So, I'm looking at this section of code in the example:
buttons: [
{ extend: "create", editor: editor },
{ extend: "edit", editor: editor },
{ extend: "remove", editor: editor }
]
I'm also looking at the button-options configuration options page
editor.buttons( {
text: 'Save',
action: function () {
this.submit();
}
} );
I think, but haven't tried yet, that I can call my different API methods via the Action function, but I'm not quite sure.
How should I modify the buttons object from the basic initialisation example to call different methods for each button?
This question has an accepted answers - jump to answer
Answers
Never mind. Found what I needed
https://editor.datatables.net/reference/option/ajax