(blot: BlockBlot, filter = true)
| 181 | // It is important for cursor behavior BlockEmbeds use tags that are block level elements |
| 182 | |
| 183 | function 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 | |
| 195 | function bubbleFormats( |
| 196 | blot: Blot | null, |
no test coverage detected
searching dependent graphs…