/*! * 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/anchor/README.md]] * @packageDocumentation * @module plugins/anchor */ import type { IJodit } from "../../types/index"; import { Plugin } from "../../core/plugin/index"; import "./config"; /** * Inserts anchors, empty `` that links in the document reach as * `#name`, and renames and removes them */ export declare class anchor extends Plugin { /** @override */ buttons: Plugin['buttons']; /** @override */ protected afterInit(jodit: IJodit): void; /** * An anchor gets its own popup, in place of the link's */ private __onClickA; /** * Anchors are uneditable in the editor, so typing beside one never goes * into it and it's deleted as a whole */ protected onChange(): void; /** * The editor's own attribute stays out of the value */ protected onAfterGetValueFromEditor(data: { value: string; }): void; /** * A pasted or dropped copy of an anchor the document already has gets the * next free name, as `fees-2`, and the links that came with it follow it */ protected onBeforePasteInsert(html: unknown): string | void; /** * The form that names a new anchor, or renames or removes `target` */ private __generateForm; /** * The form in the anchor's own popup. The popup takes it out without * destructing it when it shows something else, so it goes when the next * one is made */ private __form; private __dropForm; /** * Another element in the document has the name as its `id`, or another * anchor as its `name` */ private __isTaken; /** * At the caret, or at the start of the selection. An anchor can't go in * a link, so in one it goes just before it */ private __insert; /** * Gives the anchor the new name in whichever of `id` and `name` it has, * and the links to it the new `#name`, unless they still reach * something else by the old one, as they do after a copy is pasted */ private __rename; /** * Gives each anchor in `root` whose name the document already has the * next free one, avoiding the names in `root` too, and points the links * in `root` to it at the new name. Whether any was renamed */ private __renameCopies; /** @override */ protected beforeDestruct(jodit: IJodit): void; }