A slice represents a piece cut out of a larger document. It stores not only a fragment, but also the depth up to which nodes on both sides are 'open' (cut through).
Ported from ProseMirror's replace.ts Slice class.
Summary
Functions
The empty slice.
Test whether this slice is equal to another slice.
Deserialize a slice from its JSON representation.
Insert a fragment at the given position in this slice.
Create a slice from a fragment by taking the maximum possible open value on both sides of the fragment.
Create a new slice.
Remove content between the given positions in this slice.
The size this slice would add when inserted into a document.
Convert a slice to a JSON-serializable representation.
String representation of this slice.
Types
Functions
The empty slice.
Test whether this slice is equal to another slice.
Deserialize a slice from its JSON representation.
Insert a fragment at the given position in this slice.
Create a slice from a fragment by taking the maximum possible open value on both sides of the fragment.
Create a new slice.
Remove content between the given positions in this slice.
The size this slice would add when inserted into a document.
Convert a slice to a JSON-serializable representation.
String representation of this slice.