Changelog
2.0.0
ParentBlot
. ContainerBlot
now inherits ParentBlot
.ParentBlot#attachUI()
.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. Use Blot#replaceWith()
instead.
Blot#insertInto()
is removed. Use Parent#insertBefore()
instead.
FormatBlot
is removed. Now BlockBlot
and InlineBlot
implement Formattable
interface directly.
Typing: Blot#prev
, Blot#next
and Blot#split()
may return null
.
Typing: Other misc type declaration changes.