UNPKG

@gaoding/editor-sdk

Version:

稿定编辑器对外 SDK

55 lines (54 loc) 1.29 kB
interface Config { appId: string; container: string; /** * 获取使用权益凭证 */ getUseRightCert(info: { appId: string; useKey: string; abilityCode: string; workId: string; }): Promise<string | false | Error>; /** * 获取用户授权标识 */ authorize(): Promise<string>; } export declare function createMobileTemplateEditor(config: Config): { readonly isLoad: boolean; openTemplateList: (options: { onSelectTemplate?(info: { id: string; }): void; }) => Promise<false | { id: number; }>; close: () => void; onSave: (fn: (info: { workId: string; files: Blob[]; title: string; type: string; }) => void) => void; onTemplateLoad: (fn: () => any) => void; onClose: (fn: () => any) => void; onLoad: (fn: () => any) => void; editDesign: (options: { id: string; }) => Promise<false | { files: Blob[]; workId: number; title: string; type: string; }>; createDesign: (options: { templateId: string; }) => Promise<false | { files: Blob[]; workId: number; title: string; type: string; }>; }; export {};