├── .prettierrc ├── images ├── 6-popup.png ├── 7-result.png ├── the-bad.png ├── screenshot.png ├── 1-export-url.png └── Drawio_Notion.png ├── LICENSE.txt ├── README.md └── index.html /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "tabWidth": 2, 3 | "useTabs": false 4 | } 5 | -------------------------------------------------------------------------------- /images/6-popup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivankahl/drawio-notion-embed/HEAD/images/6-popup.png -------------------------------------------------------------------------------- /images/7-result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivankahl/drawio-notion-embed/HEAD/images/7-result.png -------------------------------------------------------------------------------- /images/the-bad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivankahl/drawio-notion-embed/HEAD/images/the-bad.png -------------------------------------------------------------------------------- /images/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivankahl/drawio-notion-embed/HEAD/images/screenshot.png -------------------------------------------------------------------------------- /images/1-export-url.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivankahl/drawio-notion-embed/HEAD/images/1-export-url.png -------------------------------------------------------------------------------- /images/Drawio_Notion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivankahl/drawio-notion-embed/HEAD/images/Drawio_Notion.png -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) [year] [fullname] 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 |
10 |

11 | 12 | Logo 13 | 14 | 15 |

draw.io Notion Embed

16 | 17 |

18 | A super simple project that lets you embed draw.io diagrams directly into Notion. 19 |
20 |
21 | View Demo 22 | · 23 | Report Bug 24 | · 25 | Request Feature 26 |

27 |

28 | 29 | 30 | 31 | ## Table of Contents 32 | 33 | - [About the Project](#about-the-project) 34 | - [Built With](#built-with) 35 | - [Getting Started](#getting-started) 36 | - [Usage](#usage) 37 | - [Contributing](#contributing) 38 | - [License](#license) 39 | - [Contact](#contact) 40 | 41 | 42 | 43 | ## About The Project 44 | 45 | [![draw.io Notion Embed](images/screenshot.png)](https://drawio-notion-embed.netlify.app/) 46 | 47 | Embedding draw.io diagrams inside Notion is a bit of pain because it doesn't work. If you have tried to embed a diagram in Notion, you will notice that it breaks. 48 | 49 | ![This is probably the error you see in Notion](images/the-bad.png) 50 | 51 | This is quite frustrating when you are doing project planning or writing technical documentation in Notion and wish to link to your diagrams in Notion. 52 | 53 | This very very simple HTML page fixes this. It allows you to specify your draw.io Embed URL and then it will render it in a fullscreen, responsive iFrame that can be embedded into Notion and look good! 54 | 55 | ### Built With 56 | 57 | We don't need no heavy JS framework (not hating on them though). However, this project has been built with the purest forms of web technologies: 58 | 59 | - HTML: uhm... Inspect Element to learn more? 60 | - CSS: again... Inspect Element... 61 | - [Vanilla JS](http://vanilla-js.com/) 62 | 63 | 64 | 65 | ## Getting Started 66 | 67 | You can either use the already deployed version on Netlify ([https://drawio-notion-embed.netlify.app/](https://drawio-notion-embed.netlify.app/)) or if you really want to you can deploy it yourself. It's a single HTML file so just drop it on any public web server and you should be good to go. 68 | 69 | If you want to deploy to Netlify, you can simply click the button below: 70 | 71 | 72 | Deploy to Netlify 73 | 74 | 75 | ## Usage 76 | 77 | 1. In draw.io, go to **File -> Export as -> URL...** 78 | 79 | ![Export the diagram to URL in draw.io](images/1-export-url.png) 80 | 2. Copy the URL that is displayed. 81 | 3. Navigate to [https://drawio-notion-embed.netlify.app/](https://drawio-notion-embed.netlify.app/) (or your own URL) 82 | 4. Paste the URL that you copied from draw.io into the text box and click **Go** 83 | 5. A link will be displayed below that you can copy 84 | 6. In Notion, paste the link and in the popup, click _Create embed_ 85 | 86 | ![The popup](images/6-popup.png) 87 | 7. You should see the diagram embedded in Notion now 88 | 89 | ![The final result](images/7-result.png) 90 | 91 | 92 | 93 | ## Contributing 94 | 95 | If you have any contributions you would like to make it would be **greatly appreciated**. 96 | 97 | 1. Fork the Project 98 | 2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`) 99 | 3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`) 100 | 4. Push to the Branch (`git push origin feature/AmazingFeature`) 101 | 5. Open a Pull Request 102 | 103 | 104 | 105 | ## License 106 | 107 | Distributed under the MIT License. See `LICENSE.txt` for more information. 108 | 109 | 110 | 111 | ## Contact 112 | 113 | Ivan Kahl - hello@ivankahl.com 114 | 115 | Project Link: [https://github.com/ivankahl/drawio-notion-embed](https://github.com/ivankahl/drawio-notion-embed) 116 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Embed draw.io in Notion 7 | 8 | 101 | 102 | 103 |
104 |
105 |
106 | 112 | 113 |
114 |
115 | Embed this URL in Notion: 116 | 117 | 118 |
119 |

120 | This website is in no way affiliated with Notion or draw.io
GitHubIvan Kahl 121 |

122 |
123 | 124 |
125 | 126 | 181 | 182 | 183 | --------------------------------------------------------------------------------