au-text-highlight
Version:
3行代码实现划词相关功能、关键字高亮、选区检测等功能。附带React版本划词popover组件。专为解决划词翻译,划词评论,web文本高亮等这类需求!目前再探索完善。
9 lines (8 loc) • 754 B
TypeScript
import sectionRangeHighlight from './core/sectionRange';
import { getSelectionRange, getSelectionRangeContent } from './core/getRange';
import { auExtractHighlightText as auExtractText } from './core';
import DrawWordConstituencyPopover from './core/drawWordConstituencyPopover';
export { auExtractText, sectionRangeHighlight, getSelectionRange, getSelectionRangeContent, DrawWordConstituencyPopover, };
export { default as ReactAuSelectionPopover } from './core/ReactPopover';
export { useTextSelection } from './core/useTextSelection';
export type { DeafultConfig, GetSectionRangeConfig, OffsetAndSetRange, TriggerPosition, UseTextSelectionOptions, UseTextSelectionReturn, ReactPopoverProps, ChildComponentRef as PopoverComponentRef, } from './types';