Question about chaining of editing methods in Editor

Question about chaining of editing methods in Editor

bebopbebop Posts: 3Questions: 0Answers: 0
edited May 2021 in Editor

Hi, I was wondering if it'd be possible to chain different editing methods and send them to the server with a unique submit() at the end

Something like:

editor.edit().remove().create().submit()

rather than:

editor.edit().submit();
editor.remove().submit();
editor.create().submit();

-
Alberto

Replies

  • allanallan Posts: 61,627Questions: 1Answers: 10,090 Site admin

    Hi Alberto,

    It’s an interesting idea, but currently, no I’m afraid that is not possible with Editor as it is at the moment. The submission of the editing actions is async, and there is no internal queue for them. So that the moment you’d need to wait for the edit action to complete, then the remove to complete and finally submit the create.

    Regards,
    Allan

This discussion has been closed.