[PR #3391] [MERGED] Made it possible to configure draw.io/diagrams.net integration #6191

Closed
opened 2026-02-05 10:26:30 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/BookStackApp/BookStack/pull/3391
Author: @ssddanbrown
Created: 4/21/2022
Status: Merged
Merged: 4/24/2022
Merged by: @ssddanbrown

Base: developmentHead: drawio_config_event


📝 Commits (2)

  • d76bbb2 Made it possible to configure draw.io/diagrams.net integration
  • 0003ce6 Fixed failing test after drawio default url change

📊 Changes

3 files changed (+10 additions, -2 deletions)

View changed files

📝 resources/js/services/drawio.js (+8 -0)
📝 resources/views/pages/parts/form.blade.php (+1 -1)
📝 tests/Uploads/DrawioTest.php (+1 -1)

📄 Description

Added new editor public event to hook into draw.io configuration step.
Required change of embed url to trigger the configure step.

Closes #3381

Docs Updates

  • Update references to the default diagrams.net embed url.
    • Now https://embed.diagrams.net/?embed=1&proto=json&spin=1&configure=1.
  • Add example of using this new public event to the existing editor events list.

Example Event Usage

<script>
    window.addEventListener('editor-drawio::configure', event => {
        const config = event.detail.config;
        config.sidebarWidth = 900;
    });
</script>

References


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/BookStackApp/BookStack/pull/3391 **Author:** [@ssddanbrown](https://github.com/ssddanbrown) **Created:** 4/21/2022 **Status:** ✅ Merged **Merged:** 4/24/2022 **Merged by:** [@ssddanbrown](https://github.com/ssddanbrown) **Base:** `development` ← **Head:** `drawio_config_event` --- ### 📝 Commits (2) - [`d76bbb2`](https://github.com/BookStackApp/BookStack/commit/d76bbb29546692732aea33ca5507df886ef6cb1b) Made it possible to configure draw.io/diagrams.net integration - [`0003ce6`](https://github.com/BookStackApp/BookStack/commit/0003ce61cd5e9ea2dee8a3fcc1788943ea39d293) Fixed failing test after drawio default url change ### 📊 Changes **3 files changed** (+10 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `resources/js/services/drawio.js` (+8 -0) 📝 `resources/views/pages/parts/form.blade.php` (+1 -1) 📝 `tests/Uploads/DrawioTest.php` (+1 -1) </details> ### 📄 Description Added new editor public event to hook into draw.io configuration step. Required change of embed url to trigger the configure step. Closes #3381 ### Docs Updates - Update references to the default diagrams.net embed url. - Now `https://embed.diagrams.net/?embed=1&proto=json&spin=1&configure=1`. - Add example of using this new public event to the existing editor events list. ### Example Event Usage ```html <script> window.addEventListener('editor-drawio::configure', event => { const config = event.detail.config; config.sidebarWidth = 900; }); </script> ``` ### References - https://www.diagrams.net/doc/faq/configure-diagram-editor - https://desk.draw.io/support/solutions/articles/16000042544 - https://github.com/jgraph/drawio-integration --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 10:26:30 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#6191