api.setNext()
Description
Allows adding some action into the Event Bus order
Usage
api.setNext(next: any): void;
Parameters
next
- (required) the action to be included into the Event Bus order
Example
const server = "https://some-backend-url";
// Assume that you have a custom server service class named someServerService
const someServerService = new ServerDataService(server);
fetch(server + "/data").then((res) => res.json()).then((data) => {
const editor = new richtext.Richtext("#root", {
value: data
});
// Integrate someServerService into the Event Bus order of widget
editor.api.setNext(someServerService);
});
Change log: The method was added in v2.0