Fabric.js Document Engine

Search documentation

Find a page or section

中文

Who builds it, how it is tested, and how to help.

fabricjs-document-engine is an open source Fabric.js npm package. It turns an existing Fabric.js canvas into a document that can be saved, reopened, undone and recovered. It does not replace Fabric.js; it works next to it.

Who makes it

It is written and maintained by Sohail Khan. The source code is on GitHub under the MIT license, so you can use it in commercial products for free.

How it is built

  • Written in TypeScript. Types ship with the Fabric.js npm package, so there is nothing extra to install.
  • ESM and CommonJS builds, checked with publint and "Are the types wrong?".
  • sideEffects: false, so bundlers drop the parts you do not import.
  • The core never imports React. React is an optional peer dependency used only by fabricjs-document-engine/react.

How it is tested

Every feature runs in real browsers before each release: Chromium, Firefox and WebKit, with Fabric.js 6 and 7. Performance budgets fail the build if undo, save or load get slower. The results are published in compatibility.

How to help

  • Report a bug or a missing feature in GitHub issues. A document that fails to open, with private content removed, is the most useful thing you can send.
  • Star the repository if this Fabric.js npm package saves you time. It helps other developers find it.
  • Improve these docs. The site is open source too.
About the Fabric.js npm package | Fabric.js Document Engine