Repository navigation
v2.2.0-rc.0
Pre-release
Pre-release
Release candidate for 2.2.0. Install with npm install draft-convert@next.
Changes
- On React 19,
convertToHTMLno longer includes the<link rel="preload" as="image">tags that React'srenderToStaticMarkupadds for every<img>( #245 ) - Support React 19 as a
peerDependency( #245, closes #224 ) immutableis 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 pinsimmutable@~3.7.4, so apps may end up with two copies; an override/resolution toimmutable@^3.8.4dedupes 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 requiredDraft/Reactby their global names) and no longer assumeswindow( #225 ) - Build and test tooling updated (Babel 7.29, Jest 30, eslint 10, prettier 3); compiled
lib/andesm/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.