Skip to content

feat: upgrade to Excalidraw 0.18.0 with legacy file compatibility#492

Open
Technophobe01 wants to merge 1 commit intobric3:mainfrom
Technophobe01:feature/upgrade-excalidraw-0.18.0
Open

feat: upgrade to Excalidraw 0.18.0 with legacy file compatibility#492
Technophobe01 wants to merge 1 commit intobric3:mainfrom
Technophobe01:feature/upgrade-excalidraw-0.18.0

Conversation

@Technophobe01
Copy link
Contributor

@Technophobe01 Technophobe01 commented Dec 22, 2025

Summary

Closes #423

Upgrades the embedded Excalidraw library from 0.17.x to 0.18.0 with full backward compatibility.

Changes

Build System Migration

  • Migrated from react-scripts (Webpack) to Vite for faster builds and better ES module support
  • Updated TypeScript configuration for Vite compatibility
  • Set "type": "module" in package.json for ESM support

Excalidraw 0.18.0 Compatibility

  • Updated @excalidraw/excalidraw to 0.18.0
  • Added required CSS import for new Excalidraw styles
  • Self-hosted fonts with EXCALIDRAW_ASSET_PATH (no CDN dependency)
  • Fixed IDE theme integration with Excalidraw wrapper

Legacy File Support

  • Added preprocessing for older Excalidraw file formats (boundElements, frameId, lineHeight fixes)
  • Fixed embedded SVG/PNG scene loading and encoded payload handling
  • Fixed font loading for deprecated fonts (Virgil, Helvetica, Cascadia)

Test Plan

  • Verified on macOS (IntelliJ IDEA, PyCharm)
  • Tested with legacy files from 0.15.x and 0.17.x
  • All file types work: .excalidraw, .excalidraw.svg, .excalidraw.png

@bric3
Copy link
Owner

bric3 commented Jan 13, 2026

Hello, sorry for the delay, I was off, then had to "unpile" stuff at work.

I haven't looked at the code yet.

But there are still a few issues, and I don't think Claude solved them

  • Opening hello.svg appear to work, but should use the IDE theme mode (dark or light) by default.

    • Also unsure if it's Excalidraw 0.18.0 with it's new format, but opening it, and just doing it modifies this file. This might be an unavoidable side-effect.
  • Opening random.png => simply erase the "content" of the file, i.e. it rewrites the PNG image with nothing inside.

  • Opening random.svg => raises the error, meaning it can't recognize this file.

    java.lang.Throwable: random.svg: [LOGSEVERITY_ERROR][https://excalidraw-jetbrains-plugin/assets/index-DPVffEDG.js:40685]:
    Error loading file: Error: Error: invalid file
    	at com.intellij.openapi.diagnostic.Logger.error(Logger.java:376)
    	at com.github.bric3.excalidraw.editor.ExcalidrawWebViewController$initJcefPanel$5.onConsoleMessage(ExcalidrawWebViewController.kt:221)
    	at com.intellij.ui.jcef.JBCefClient$3.lambda$onConsoleMessage$4(JBCefClient.java:301)
    	at com.intellij.ui.jcef.JBCefClient$HandlerSupport.lambda$handle$0(JBCefClient.java:733)
    	at java.base/java.lang.Iterable.forEach(Iterable.java:75)
    	at java.base/java.util.Collections$SynchronizedCollection.forEach(Collections.java:2131)
    	at com.intellij.ui.jcef.JBCefClient$HandlerSupport.handle(JBCefClient.java:733)
    	at com.intellij.ui.jcef.JBCefClient$HandlerSupport.handleBoolean(JBCefClient.java:738)
    	at com.intellij.ui.jcef.JBCefClient$3.onConsoleMessage(JBCefClient.java:300)
    	at jcef/org.cef.CefClient.onConsoleMessage(CefClient.java:354)
    

    Some other time the excalidraw editor is simply blank.


Please avoid closing and re-oping a new PR, this makes things difficult to review.

@Technophobe01
Copy link
Contributor Author

Let me take a look at the code and check against your comments. As an aside, I may have do / undo working still noodling on two edge cases.

Closes bric3#423

Build System Migration:
- Migrated from react-scripts (Webpack) to Vite for faster builds
- Updated TypeScript configuration for Vite compatibility
- Set "type": "module" in package.json for ESM support

Excalidraw 0.18.0 Compatibility:
- Updated @excalidraw/excalidraw to 0.18.0
- Added required CSS import for new Excalidraw styles
- Self-hosted fonts with EXCALIDRAW_ASSET_PATH (no CDN dependency)
- Fixed IDE theme integration with Excalidraw wrapper

Legacy File Support:
- Added preprocessing for older Excalidraw file formats
  (boundElements, frameId, lineHeight fixes)
- Fixed embedded SVG/PNG scene loading and encoded payload handling
- Fixed font loading for deprecated fonts (Virgil, Helvetica, Cascadia)

Signed-off-by: Technophobe01 <pkjarvis01@gmail.com>
@Technophobe01 Technophobe01 force-pushed the feature/upgrade-excalidraw-0.18.0 branch from db368cf to d08b56e Compare February 17, 2026 23:45
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

Successfully merging this pull request may close these issues.

Upgrade to Excalidraw 0.18.0

2 participants