/*! * 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/resize-cells/README.md]] * @packageDocumentation * @module plugins/resize-cells */ import type { IJodit } from "../../types/index"; import { Plugin } from "../../modules/index"; import "./config"; /** * Process tables in editor */ export declare class resizeCells extends Plugin { /** * Shortcut for Table module */ private get module(); /** * Now editor has rtl direction */ private get isRTL(); private selectMode; private resizeDelta; private resizeHandler; private showResizeHandle; private hideResizeHandle; private createResizeHandle; private hideTimeout; private drag; private wholeTable; private workCell; private workTable; private minX; private maxX; private startX; /** * The table's and its cells' styles as a column drag started, put back * as it ends, before the final widths */ private startStyles; private startLeft; private startEdge; /** * For each of the two columns a drag resizes, the cell whose width * `setColumnWidthByDelta` sets, with its width as the drag started, and * the cells below it, whose widths it clears */ private startWidths; /** * The table's width as the drag started, and for a drag of its edge, the * width inside what holds it and its margin on that side */ private startTableWidth; private startParentWidth; private startMargin; /** * The row whose height the handle sets, or null while it sets a width */ private workRow; private startY; private startHeight; private rowStyle; /** * The boxes that scroll the row, with their styles, as a row drag turns * off their scroll anchoring, which would move the border off the pointer */ private anchored; private scrolled; private scrollFrame; private pointerY; /** * Click on resize handle */ private onHandleMouseDown; /** * Mouse move after click on resize handle */ private onMouseMove; /** * Mouse up every where after move and click */ private onMouseUp; private resizeColumnsOrTable; private restoreStyles; /** * Where the border the handle is on lies: the work cell's left side * for the table's left edge, otherwise its right side */ private columnEdge; /** * Sets the row's height from where the pointer is, and how far the drag * has scrolled. The browser keeps the row as tall as its content */ private resizeRow; /** * While the pointer is near or past the top or bottom of the part of the * row's scroller in view, scrolls it on, and the row's border with it */ private scrollAlong; /** * The two columns a column drag resizes: the work cell's last, and the * next cell's first */ private resizedColumns; /** * Resize only one column */ private resizeColumns; /** * Sets the widths `resizeColumns` would while the handle is dragged, from * the widths the drag started with, so that a move doesn't put back every * cell's style and lay the table out again to measure them */ private setColumnWidths; /** * Resize whole table */ private resizeTable; /** * Memoize current cell * * @param wholeTable - resize whole table by left side, * false - resize whole table by right side, null - resize column */ private setWorkCell; /** * Calc helper resize handle position */ private calcHandlePosition; /** * Shows the handle across the table on the border below a row, near the * cell's bottom or near its top, which is the bottom of the row above. * The table's top edge has no row above it */ private calcRowHandlePosition; /** * Lays the handle across the table on the border below the row */ private placeRowHandle; /** @override */ afterInit(editor: IJodit): void; /** * Add to every Table listeners */ private observe; beforeDestruct(jodit: IJodit): void; }