Skip to content

v2.2.0-rc.0

Pre-release
Pre-release

Choose a tag to compare

@henryqdineen henryqdineen released this 28 Oct 21:39
40f7bc1

Release candidate for 2.2.0. Install with npm install draft-convert@next.

Changes

  • On React 19, convertToHTML no longer includes the <link rel="preload" as="image"> tags that React's renderToStaticMarkup adds for every <img> ( #245 )
  • Support React 19 as a peerDependency ( #245, closes #224 )
  • immutable is now ~3.8.4 (was ~3.7.4) for GHSA-wf6x-7x77-mvgw, GHSA-xvcm-6775-5m9r and GHSA-v56q-mh7h-f735 ( #229 ). draft-js pins immutable@~3.7.4, so apps may end up with two copies; an override/resolution to immutable@^3.8.4 dedupes them and patches draft-js's copy too.
  • The UMD bundle in dist/ is now built with rollup. It now works under CommonJS and AMD (it previously required Draft/React by their global names) and no longer assumes window ( #225 )
  • Build and test tooling updated (Babel 7.29, Jest 30, eslint 10, prettier 3); compiled lib/ and esm/ output is equivalent ( #234, #237 )

React 19 notes

These are React 19 behavior changes that draft-convert doesn't undo:

  • javascript: URLs in rendered elements are replaced by React with a URL that throws.
  • <title>, <meta> and <link> inside block or entity HTML are moved to just before that element.