- Allow ref blots to be null
- Keep identify names in built code bundle
- Make the bundle a valid ESM page
- Improve typings for Blot
- Improved typing for Attributor and Registry.
- Fix ESM bundle not exposed in package.json.
- BREAKING: Types are now directly exposed from
parchment
. - Added ESM bundle.
- Fixed typing for
Parent#descendants
. - Updated
Blot.tagName
to allowstring[]
.
Registry.find()
handles restricted nodes on Firefox.
- Add
ParentBlot
.ContainerBlot
now inheritsParentBlot
. - Add UI node support with
ParentBlot#attachUI()
. - Fix compatibility with TypeScript 3.7.
- Ensure
Scroll#find()
does not return blots in child scrolls.
-
The default export is removed. Use named exports instead:
Before:
import Parchment from 'parchment'; const blot = Parchment.create(/* ... */); class MyContainer extends Parchment.Container {}
After:
import { Registry, ContainerBlot } from 'parchment'; const blot = Registry.create(/* ... */); class MyContainer extends Parchment.ContainerBlot {}
-
ParentBlot.defaultChild
requires a blot constructor instead of a string. -
Blot#replace()
is removed. UseBlot#replaceWith()
instead. -
Blot#insertInto()
is removed. UseParent#insertBefore()
instead. -
FormatBlot
is removed. NowBlockBlot
andInlineBlot
implementFormattable
interface directly. -
Typing:
Blot#prev
,Blot#next
andBlot#split()
may returnnull
. -
Typing: Other misc type declaration changes.