Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Changelog
1.1.1 (Unreleased)
-----------------------
- Fix #21: Missing icon in Context Menu (File handler)
- Fix #24: Fix creating a new file and loading a saved file

1.1.0 (August 28, 2025)
-----------------------
Expand Down
9 changes: 0 additions & 9 deletions resources/humhub.drawio.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,6 @@ humhub.module('drawio', function (module, require, $) {
Editor.prototype.initEditor = function () {
var that = this;

if (typeof drawioEditorFileGuids === 'undefined') {
drawioEditorFileGuids = [];
}
if (drawioEditorFileGuids.indexOf(that.options.fileGuid) !== -1) {
// Don't initialize it twice
return;
}
drawioEditorFileGuids.push(that.options.fileGuid);

$(window).on('message', function (e) {
if ($('[data-ui-widget="drawio.Editor"]').data('file-guid') !== that.options.fileGuid) {
// Skip event from editor of another file
Expand Down
2 changes: 1 addition & 1 deletion widgets/EditorWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function getData()
'file-guid' => $this->file->guid,
'file-name' => Html::encode($this->file->fileName),
'file-extension' => Html::encode(strtolower(FileHelper::getExtension($this->file))),
'file-content' => file_get_contents($this->file->store->get()),
'file-content' => file_get_contents($this->file->store->get()) ?: null,
'file-save-url' => Url::to(['/drawio/open/update', 'guid' => $this->file->guid]),
'user-guid' => ($user) ? Html::encode($user->guid) : '',
'user-first-name' => ($user) ? Html::encode($user->profile->firstname) : 'Anonymous',
Expand Down