플러그인: 모달에서 toolbarEvent에 액세스

나도 같은 문제를 겪었어요. 몇 년이 지난 후에야 (모달 안에서 toolbarEvent에 접근할 수 없었거든요) 이 해결책이 저에게도 효과가 있었습니다.

      api.onToolbarCreate((toolbar) => {
        toolbar.addButton({
          ...
          sendAction: (event) =>
            toolbar.context.send("triggerMyModal", event),
          ...
        });
      });

      api.modifyClass("component:d-editor", {
        modal: service(),
        pluginId: "poll",
        actions: {
          triggerMyModal(toolbarEvent) {
            this.modal.show(MyCustomModal, {
              model: {
                toolbarEvent,
              },
            });
          },
        },
      });

도움 주셔서 감사합니다, Keegan.