mirror of
https://github.com/codex-team/editor.js
synced 2024-06-27 18:01:14 +02:00
19 lines
518 B
TypeScript
19 lines
518 B
TypeScript
|
/**
|
||
|
* Describes methods for work with Selections
|
||
|
*/
|
||
|
export interface Selection {
|
||
|
/**
|
||
|
* Looks ahead from selection and find passed tag with class name
|
||
|
* @param {string} tagName - tag to find
|
||
|
* @param {string} className - tag's class name
|
||
|
* @return {HTMLElement|null}
|
||
|
*/
|
||
|
findParentTag(tagName: string, className?: string): HTMLElement|null;
|
||
|
|
||
|
/**
|
||
|
* Expand selection to passed tag
|
||
|
* @param {HTMLElement} node - tag that should contain selection
|
||
|
*/
|
||
|
expandToTag(node: HTMLElement): void;
|
||
|
}
|