mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-28 17:02:04 +03:00
Made it possible to configure draw.io/diagrams.net integration
Added new editor public event to hook into draw.io configuration step. Required change of embed url to trigger the configure step.
This commit is contained in:
@ -43,6 +43,8 @@ function drawReceive(event) {
|
||||
drawEventSave(message);
|
||||
} else if (message.event === 'export') {
|
||||
drawEventExport(message);
|
||||
} else if (message.event === 'configure') {
|
||||
drawEventConfigure();
|
||||
}
|
||||
}
|
||||
|
||||
@ -63,6 +65,12 @@ function drawEventInit() {
|
||||
});
|
||||
}
|
||||
|
||||
function drawEventConfigure() {
|
||||
const config = {};
|
||||
window.$events.emitPublic(iFrame, 'editor-drawio::configure', {config});
|
||||
drawPostMessage({action: 'configure', config});
|
||||
}
|
||||
|
||||
function drawEventClose() {
|
||||
window.removeEventListener('message', drawReceive);
|
||||
if (iFrame) document.body.removeChild(iFrame);
|
||||
|
Reference in New Issue
Block a user