0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

[備忘録]draw.ioの公式MCPサーバが外部通信する契機

0
Posted at

はじめに

という記事を見かけて会社でつかえるかなーと調査したメモ。

対象

外部通信契機

Open in draw.io ボタンを押すとコンテンツが外部送信されてしまいそうです。

function generateDrawioEditUrl(xml) {
  const encoded = encodeURIComponent(xml);
  const compressed = pako.deflateRaw(encoded);
  const base64 = btoa(Array.from(compressed, (b) => String.fromCharCode(b)).join(""));
  const createObj = { type: "xml", compressed: true, data: base64 };
  return "https://app.diagrams.net/#create=" + encodeURIComponent(JSON.stringify(createObj));
}
  <body>
    <div id="loading"><div class="spinner"></div>Loading diagram...</div>
    <div id="error"></div>
    <div id="diagram-container"></div>
    <div id="toolbar">
      <button id="open-drawio">Open in draw.io</button>
      <button id="fullscreen-btn">Fullscreen</button>
    </div>

感想

直接使わないでforkしたほうがいい気がします

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?