jodit
Version:
Jodit is an awesome and useful wysiwyg editor with filebrowser
80 lines (79 loc) • 2.99 kB
TypeScript
/*!
* 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
*/
/**
* @module plugins/link
*/
import type { IJodit, IUIForm, IUIOption } from "../../types/index";
declare module 'jodit/config' {
interface Config {
link: {
/**
* Template for the link dialog form
*/
formTemplate: (editor: IJodit) => string | HTMLElement | IUIForm;
formClassName?: string;
/**
* Follow link address after dblclick
*/
followOnDblClick: boolean;
/**
* Replace inserted youtube/vimeo link to `iframe`
*/
processVideoLink: boolean;
/**
* Wrap inserted link
*/
processPastedLink: boolean;
/**
* When opening the link dialog for a new link with an empty URL field,
* pre-fill it from the selected text if that text looks like a URL or
* an email address (`example.com` → `https://example.com`,
* `user@site.com` → `mailto:user@site.com`). Plain text that is not a
* URL/email is left untouched. Default: false.
*/
deriveUrlFromText: boolean;
/**
* Show `no follow` checkbox in link dialog.
*/
noFollowCheckbox: boolean;
/**
* Show `Open in new tab` checkbox in link dialog.
*/
openInNewTabCheckbox: boolean;
/**
* Default value for the `Open in new tab` checkbox when inserting a new link.
*/
openInNewTabCheckboxDefaultChecked: boolean;
/**
* Show an `aria-label` text input in the link dialog so an
* accessible name can be set on the `<a>` (useful when several
* links share the same visible text, e.g. "here"). Default: false.
*/
ariaLabelInput: boolean;
/**
* Use an input text to ask the classname or a select or not ask
*/
modeClassName: 'input' | 'select';
/**
* Allow multiple choises (to use with modeClassName="select")
*/
selectMultipleClassName: boolean;
/**
* The size of the select (to use with modeClassName="select")
*/
selectSizeClassName?: number;
/**
* The list of the option for the select (to use with modeClassName="select")
*/
selectOptionsClassName: IUIOption[];
hotkeys: string[];
/**
* Prevent navigation to the link if it is readonly. Default: true
*/
preventReadOnlyNavigation: boolean;
};
}
}