@antv/narrative-text-vis
Version:
React component of interactive narrative text
20 lines (19 loc) • 1.05 kB
TypeScript
import { NarrativeTextSpec } from '@antv/narrative-text-schema';
import { ThemeProps, ExtensionProps, NarrativeEvents } from './interface';
export declare type NarrativeTextVisProps = ThemeProps & ExtensionProps & NarrativeEvents & {
/**
* @description specification of narrative text spec
* @description.zh-CN Narrative 描述 json 信息
*/
spec: NarrativeTextSpec;
/**
* @description the function to be called when copy event is listened. If it is undefined, the default behavior is to put the transformed html and plain text into user's clipboard
* @description.监听到 copy 事件时执行的函数,可用于控制复制的内容和复制行为,如果不传,默认将会把转换后的富文本和纯文本内容放入剪切板
*/
copyNarrative?: (content: {
spec: NarrativeTextSpec;
plainText: string;
html: string;
}) => void;
};
export declare function NarrativeTextVis({ spec, size, pluginManager, copyNarrative, ...events }: NarrativeTextVisProps): JSX.Element;