Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: Configurable Editor.defaultCompressed when embed mode #3484

Closed
2 tasks done
kaishuu0123 opened this issue Apr 1, 2023 · 4 comments
Closed
2 tasks done

RFC: Configurable Editor.defaultCompressed when embed mode #3484

kaishuu0123 opened this issue Apr 1, 2023 · 4 comments

Comments

@kaishuu0123
Copy link

kaishuu0123 commented Apr 1, 2023

  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Is your feature request related to a problem? Please describe.

  • I'm using Embed mode with iframe.
  • Starting with v21.1.0, XML is no longer compressed by default.
  • However, I have a case where I want XML in compressed form. (backward compatibility).

Describe the solution you'd like

Describe alternatives you've considered

  • I tried to configure drawio in embeded mode in an iframe but could not. (Cross Origin etc.)

Additional context

@kaishuu0123 kaishuu0123 changed the title RFC: Configurable Editor.defaultCompressed when embeded mode RFC: Configurable Editor.defaultCompressed when embed mode Apr 1, 2023
@alderg
Copy link
Contributor

alderg commented Apr 3, 2023

Thanks for the report. We'll use compressXml to update Editor.defaultCompressed in the next release, eg.

frame.contentWindow.postMessage(JSON.stringify({action: 'configure', config: {compressXml: true}}), '*');

@alderg alderg closed this as completed Apr 3, 2023
@davidjgraph
Copy link
Collaborator

Just to note, we disabled compression by default because we suspected there was a rare (1 in some billion) case where compression and decompression did not work using the version of the Pako library we used.

We don't know if the updated Pako library solved that, but we switched to uncompressed everywhere for safety.

Note that embedding code should always be able to deal with uncompressed XML, this wasn't a breaking API change, more a breaking default change.

@davidjgraph
Copy link
Collaborator

In 21.1.4 release.

@kaishuu0123
Copy link
Author

@alderg @davidjgraph

Thanks for release! (v21.1.4)

Just to note, we disabled compression by default because we suspected there was a rare (1 in some billion) case where compression and decompression did not work using the version of the Pako library we used.

I'm surprised at this. Glad to hear your valuable knowledge!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants