- 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.tagNameto allowstring[].
Registry.find()handles restricted nodes on Firefox.
- Add
ParentBlot.ContainerBlotnow 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.defaultChildrequires a blot constructor instead of a string. -
Blot#replace()is removed. UseBlot#replaceWith()instead. -
Blot#insertInto()is removed. UseParent#insertBefore()instead. -
FormatBlotis removed. NowBlockBlotandInlineBlotimplementFormattableinterface directly. -
Typing:
Blot#prev,Blot#nextandBlot#split()may returnnull. -
Typing: Other misc type declaration changes.