/*! * Jodit Editor (https://xdsoft.net/jodit/) * Released under MIT see LICENSE.txt in the project root for license information. * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net */ /** * [[include:plugins/delete/README.md]] * @packageDocumentation * @module plugins/delete */ import type { IJodit } from "../../types/index"; import { Plugin } from "../../core/plugin/index"; import "./interface"; export declare class deleteCommand extends Plugin { static requires: string[]; protected afterInit(jodit: IJodit): void; protected beforeDestruct(jodit: IJodit): void; /** * After Delete command remove extra BR */ private __afterDeleteCommand; private __onDeleteCommand; /** * Firefox selects cells whole from their row, as after a drag into or out * of a table nested in a cell, and `deleteContents` would remove them. The * edges move into the cells, so their content is cleared instead, as in * Firefox's own delete */ private __moveEdgesIntoCells; /** * The formatting elements the deletion takes whole from its start, * outermost first: `` and `` for all of the text in * `cd` */ private __formatTakenWhole; /** * As the browsers do, the next letter typed keeps the formatting that was * deleted whole: empty copies go where it was, round an invisible space, * as Bold does at a collapsed caret, and the caret goes inside (#1784) */ private __keepFormat; /** * A selection that starts or ends in a table cell clears the selected part * of each cell it covers and keeps the cells, as the browsers do. * `deleteContents` would remove the cells it fully covers, and the cells * it cuts would then be merged as blocks. The range is moved out of those * tables, so only the content between them is left to delete. * * Returns where the caret goes, or null when no table is involved */ private __clearSelectedCells; private __moveContentInLeftSibling; /** * A plain space the deletion leaves at an edge of the block, before a line * break or next to another space isn't shown, and the browser drops it when * the next char is typed. It becomes non-breaking, as in the browsers' own * delete and in Backspace without a selection (#1522) */ private __keepSpacesVisible; /** * A deletion that starts or ends in a table leaves the fake between the * table and the block it reached into, and a space at that block's edge * would be hidden as well (#1783) */ private __keepSpacesVisibleBesideTable; /** * The text, line break or other element next to the caret in its block, * looking inside inline elements */ private __findNeighbor; /** * If left sibling is list - return last leaf */ private __defineRightLeftBox; /** * Add BR in the empty block left at the caret */ private __addBrInEmptyBlock; private __moveCursorInEditableSibling; }