mirror of https://gitee.com/godoos/godoos.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
895 B
895 B
通用 API
splitText
功能:拆分字符
用法:
import { splitText } from '@hufe921/canvas-editor'
splitText(text: string): string[]
createDomFromElementList
功能:根据 elementList 创建 dom 树
用法:
import { createDomFromElementList } from '@hufe921/canvas-editor'
createDomFromElementList(elementList: IElement[], options?: IEditorOption): HTMLDivElement
getElementListByHTML
功能:根据 HTML 创建 elementList
用法:
import { getElementListByHTML } from '@hufe921/canvas-editor'
getElementListByHTML(htmlText: string, options: IGetElementListByHTMLOption): IElement[]
getTextFromElementList
功能:根据 elementList 创建文本
用法:
import { getTextFromElementList } from '@hufe921/canvas-editor'
getTextFromElementList(elementList: IElement[]): string