import type { BlockElement } from 'roosterjs-editor-types'; /** * @internal * This presents a content block that can be represented by a single html block type element. * In most cases, it corresponds to an HTML block level element, i.e. P, DIV, LI, TD etc. */ export default class NodeBlockElement implements BlockElement { private element; constructor(element: HTMLElement); /** * Collapse this element to a single DOM element. * If the content nodes are separated in different root nodes, wrap them to a single node * If the content nodes are included in root node with other nodes, split root node */ collapseToSingleElement(): HTMLElement; /** * Get the start node of the block * For NodeBlockElement, start and end essentially refers to same node */ getStartNode(): Node; /** * Get the end node of the block * For NodeBlockElement, start and end essentially refers to same node */ getEndNode(): Node; /** * Checks if it refers to same block */ equals(blockElement: BlockElement): boolean; /** * Checks if a block is after the current block */ isAfter(blockElement: BlockElement): boolean; /** * Checks if a certain html node is within the block */ contains(node: Node): boolean; /** * Get the text content of this block element */ getTextContent(): string; }