/** * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options */ /** * @module engine/view/domconverter */ import { ViewText } from "./text.js"; import { ViewElement } from "./element.js"; import { ViewUIElement } from "./uielement.js"; import { ViewPosition } from "./position.js"; import { ViewRange } from "./range.js"; import { ViewSelection } from "./selection.js"; import { ViewDocumentFragment } from "./documentfragment.js"; import { type MatcherPattern } from "./matcher.js"; import { type ViewNode } from "./node.js"; import { type ViewDocument } from "./document.js"; import { type ViewDocumentSelection } from "./documentselection.js"; import { type ViewEditableElement } from "./editableelement.js"; import { type ViewRawElement } from "./rawelement.js"; type DomNode = globalThis.Node; type DomElement = globalThis.HTMLElement; type DomDocument = globalThis.Document; type DomDocumentFragment = globalThis.DocumentFragment; type DomRange = globalThis.Range; type DomText = globalThis.Text; type DomSelection = globalThis.Selection; /** * `ViewDomConverter` is a set of tools to do transformations between DOM nodes and view nodes. It also handles * {@link module:engine/view/domconverter~ViewDomConverter#bindElements bindings} between these nodes. * * An instance of the DOM converter is available under * {@link module:engine/view/view~EditingView#domConverter `editor.editing.view.domConverter`}. * * The DOM converter does not check which nodes should be rendered (use {@link module:engine/view/renderer~ViewRenderer}), does not keep the * state of a tree nor keeps the synchronization between the tree view and * the DOM tree (use {@link module:engine/view/document~ViewDocument}). * * The DOM converter keeps DOM elements to view element bindings, so when the converter gets destroyed, the bindings are lost. * Two converters will keep separate binding maps, so one tree view can be bound with two DOM trees. */ export declare class ViewDomConverter { readonly document: ViewDocument; /** * Whether to leave the View-to-DOM conversion result unchanged or improve editing experience by filtering out interactive data. */ readonly renderingMode: "data" | "editing"; /** * The mode of a block filler used by the DOM converter. */ blockFillerMode: ViewBlockFillerMode; /** * Elements which are considered pre-formatted elements. */ readonly preElements: Array; /** * Elements which are considered block elements (and hence should be filled with a * {@link #isBlockFiller block filler}). * * Whether an element is considered a block element also affects handling of trailing whitespaces. * * You can extend this array if you introduce support for block elements which are not yet recognized here. */ readonly blockElements: Array; /** * A list of elements that exist inline (in text) but their inner structure cannot be edited because * of the way they are rendered by the browser. They are mostly HTML form elements but there are other * elements such as `` or `