MCPcopy
hub / github.com/slab/quill / blockDelta

Function blockDelta

packages/quill/src/blots/block.ts:183–193  ·  view source on GitHub ↗
(blot: BlockBlot, filter = true)

Source from the content-addressed store, hash-verified

181// It is important for cursor behavior BlockEmbeds use tags that are block level elements
182
183function blockDelta(blot: BlockBlot, filter = true) {
184 return blot
185 .descendants(LeafBlot)
186 .reduce((delta, leaf) => {
187 if (leaf.length() === 0) {
188 return delta;
189 }
190 return delta.insert(leaf.value(), bubbleFormats(leaf, {}, filter));
191 }, new Delta())
192 .insert('\n', bubbleFormats(blot));
193}
194
195function bubbleFormats(
196 blot: Blot | null,

Callers 2

highlightMethod · 0.85
deltaMethod · 0.85

Calls 3

bubbleFormatsFunction · 0.85
lengthMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…