import type { Entity, KnownEntityItem } from 'roosterjs-editor-types'; /** * @deprecated * Create a placeholder comment node for entity * @param entity The entity to create placeholder from * @returns A placeholder comment node as */ export declare function createEntityPlaceholder(entity: Entity): HTMLElement; /** * Move content from a container into a new Document fragment, and try keep entities to be reusable by creating placeholder * for them in the document fragment. * If an entity is directly under root container, the whole entity can be reused and no need to move it at all. * If an entity is not directly under root container, it is still reusable, but it may need some movement. * In any case, entities will be replaced with a placeholder in the target document fragment. * We will use an entity map (the "entities" parameter) to save the map from entity id to its wrapper element. * @param root The root element * @param entities A map from entity id to entity wrapper element * @returns A new document fragment contains all the content and entity placeholders */ export declare function moveContentWithEntityPlaceholders(root: HTMLDivElement, entities: Record): DocumentFragment; /** * Restore HTML content from a document fragment that may contain entity placeholders. * @param source Source document fragment that contains HTML content and entity placeholders * @param target Target container, usually to be editor root container * @param entities A map from entity id to entity wrapper, used for reusing existing DOM structure for entity * @param insertClonedNode When pass true, merge with a cloned copy of the nodes from source fragment rather than the nodes themselves @default false */ export declare function restoreContentWithEntityPlaceholder(source: ParentNode, target: HTMLElement, entities: Record | null, insertClonedNode?: boolean): void;