/** * @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 ai/aicore/utils/documentrange */ import { DocumentPosition } from './documentposition.js'; import { Document } from './htmlparser.js'; /** * Represents a range in a htmlparser's Document limited by two * {@link module:ai/aicore/utils/documentposition~DocumentPosition} instances. */ export declare class DocumentRange { readonly start: DocumentPosition; readonly end: DocumentPosition; constructor(start: DocumentPosition, end: DocumentPosition); isEqual(otherRange: DocumentRange): boolean; /** * Nudges {@link #start} and {@link #end} positions to the word boundary so that the range does not split * a word. * * See {@link module:ai/aicore/utils/documentposition~DocumentPosition#getNudgedToWordBoundary} for more details. */ getNudgedToWordBoundary(): DocumentRange; /** * Returns a document with the content of this range. The content is extracted from the original document, * preserving the original structure. * * For instance, for the following document and range: * * ```html *
fo[o
*bar ba]z
*qux
* ``` * * the resulting document will be * * ```html *o
*bar ba
* ``` */ getContent(): Document; }