Gitea: integration with Draw.io #12372

Open
opened 2025-11-02 10:07:45 -06:00 by GiteaMirror · 14 comments
Owner

Originally created by @AKopytenko on GitHub (Jan 23, 2024).

Feature Description

Hi there!

I have an idea for integrating Gitea services and Draw.io. In my opinion, this can be a pretty useful thing!

"The user attaches the .drawio file to the messages in the issues. When clicking on the attached file, the user is redirected to the draw.io, at the same time, the contents of the file [XML in base64 or the like] are sent to the payload of the POST request. Draw.io receiving the file content and expands it into a schema. Apparently, the issue is complex and requires collaboration with the guys from Gitea. Let's try?" (с)

https://github.com/jgraph/drawio/issues/4128

Screenshots

No response

Originally created by @AKopytenko on GitHub (Jan 23, 2024). ### Feature Description Hi there! I have an idea for integrating Gitea services and Draw.io. In my opinion, this can be a pretty useful thing! "The user attaches the .drawio file to the messages in the issues. When clicking on the attached file, the user is redirected to the draw.io, at the same time, the contents of the file [XML in base64 or the like] are sent to the payload of the POST request. Draw.io receiving the file content and expands it into a schema. Apparently, the issue is complex and requires collaboration with the guys from Gitea. Let's try?" (с) https://github.com/jgraph/drawio/issues/4128 ### Screenshots _No response_
GiteaMirror added the topic/content-renderingtype/proposal labels 2025-11-02 10:07:45 -06:00
Author
Owner

@silverwind commented on GitHub (Jan 27, 2024):

Ideally we would render .drawio files ourselves, but as far as I can tell, the drawio renderer is not available as standalone JS.

It is possible to self-host draw.io though, so if a integration is done, it should have configurable target URL. Iframing is certainly an option.

@silverwind commented on GitHub (Jan 27, 2024): Ideally we would render .drawio files ourselves, but as far as I can tell, the drawio renderer is not available as standalone JS. It is possible to self-host draw.io though, so if a integration is done, it should have configurable target URL. Iframing is certainly an option.
Author
Owner

@techknowlogick commented on GitHub (Jan 27, 2024):

I wonder if this could be achieved with an external renderer via the config so nothing new needs to be added to Gitea

@techknowlogick commented on GitHub (Jan 27, 2024): I wonder if this could be achieved with an external renderer via the config so nothing new needs to be added to Gitea
Author
Owner

@lunny commented on GitHub (Jan 31, 2024):

I wonder if this could be achieved with an external renderer via the config so nothing new needs to be added to Gitea

I don't think it's possible to be as an external renderer. Because it needs to read/save the files. It should be more like the markdown editor of course for .drawio files but .md files.

@lunny commented on GitHub (Jan 31, 2024): > I wonder if this could be achieved with an external renderer via the config so nothing new needs to be added to Gitea I don't think it's possible to be as an external renderer. Because it needs to read/save the files. It should be more like the markdown editor of course for .drawio files but .md files.
Author
Owner

@lunny commented on GitHub (Jan 31, 2024):

According to the statement on their README.

draw.io is not suitable as a framework for building other products from. For this try either Tldraw or Excalidraw.

Tldraw is non-commercial license. Looks like https://github.com/excalidraw/excalidraw is the only possible solution.

@lunny commented on GitHub (Jan 31, 2024): According to the statement on their README. > draw.io is not suitable as a framework for building other products from. For this try either [Tldraw](https://github.com/tldraw/tldraw) or [Excalidraw](https://github.com/excalidraw/excalidraw). Tldraw is non-commercial license. Looks like https://github.com/excalidraw/excalidraw is the only possible solution.
Author
Owner

@silverwind commented on GitHub (Jan 31, 2024):

As I understand it, the only official draw.io interface is the full-blown editor UI. What we need would be a viewer-only UI. Maybe there are third-party made renderes available somewhere.

@silverwind commented on GitHub (Jan 31, 2024): As I understand it, the only official draw.io interface is the full-blown editor UI. What we need would be a viewer-only UI. Maybe there are third-party made renderes available somewhere.
Author
Owner

@silverwind commented on GitHub (Jan 31, 2024):

Seems confluence has done some integration with a viewer.min.js file from the draw.io repo, so it may be possible:

https://www.drawio.com/doc/faq/configure-javascript-viewer-drawio-confluence-server

@silverwind commented on GitHub (Jan 31, 2024): Seems confluence has done some integration with a `viewer.min.js` file from the draw.io repo, so it may be possible: https://www.drawio.com/doc/faq/configure-javascript-viewer-drawio-confluence-server
Author
Owner

@tobhv commented on GitHub (Feb 25, 2024):

gitlab supports viewing, editing draw.io files. seems to work offline from draw.io some links:

i think editing is a very nice feature.

@tobhv commented on GitHub (Feb 25, 2024): gitlab supports viewing, editing draw.io files. seems to work offline from draw.io some links: - some code in master: https://gitlab.com/gitlab-org/gitlab/-/tree/master/app/assets/javascripts/drawio?ref_type=heads - and merge request that looks like mvp: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/86206/diffs#7981eac67e1980a41d95e5bfc2ccea7350ce53ae i think editing is a very nice feature.
Author
Owner

@silverwind commented on GitHub (Feb 25, 2024):

Seems they are embedding a iframe from https://embed.diagrams.net, not an ideal solution but could at least work with self-hosted renderer if that URL is made configurable.

@silverwind commented on GitHub (Feb 25, 2024): Seems they are embedding a iframe from `https://embed.diagrams.net`, not an ideal solution but could at least work with self-hosted renderer if that URL is made configurable.
Author
Owner

@lafriks commented on GitHub (Feb 25, 2024):

Why not just use drawio JS as lib?

@lafriks commented on GitHub (Feb 25, 2024): Why not just use drawio JS as lib?
Author
Owner

@silverwind commented on GitHub (Feb 25, 2024):

Why not just use drawio JS as lib?

There is no lib as far as I know, it's only available integrated with their backend.

@silverwind commented on GitHub (Feb 25, 2024): > Why not just use drawio JS as lib? There is no lib as far as I know, it's only available integrated with their backend.
Author
Owner

@mbnoimi commented on GitHub (Jan 4, 2025):

+1
I missed this feature after migrating my repositories from Gltlab into Gitea

@mbnoimi commented on GitHub (Jan 4, 2025): +1 I missed this feature after migrating my repositories from Gltlab into Gitea
Author
Owner

@lunny commented on GitHub (Jul 6, 2025):

This could be a plugin after #34917 is implemented

@lunny commented on GitHub (Jul 6, 2025): This could be a plugin after #34917 is implemented
Author
Owner

@silverwind commented on GitHub (Jul 7, 2025):

Yes, but it would still require a external render server. The JS could render a <iframe>. Thought I guess it may be easier to just support this iframe-rendering first-party, it's probably only a few lines of code.

@silverwind commented on GitHub (Jul 7, 2025): Yes, but it would still require a external render server. The JS could render a `<iframe>`. Thought I guess it may be easier to just support this iframe-rendering first-party, it's probably only a few lines of code.
Author
Owner

@silverwind commented on GitHub (Sep 25, 2025):

According to https://github.com/jgraph/drawio/discussions/3430#discussioncomment-5322399, it may be possible to render .drawio to HTML with the viewer JS.

@silverwind commented on GitHub (Sep 25, 2025): According to https://github.com/jgraph/drawio/discussions/3430#discussioncomment-5322399, it may be possible to render `.drawio` to HTML with the viewer JS.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#12372