aliquidexplicabo
Version:
Editor.js — Native JS, based on API and Open Source
19 lines (17 loc) • 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;
}