import { InjectionToken } from '@angular/core'; import EditorJS, { EditorConfig, OutputData } from '@editorjs/editorjs'; /** * Configuration for creating an EditorJS instance */ export interface EditorJSInstanceConfig { /** * The editor configuration, this is required with at least the `holder` property */ editorConfig: EditorConfig; /** * The method to call when the editor makes a change */ onChange?: (holder?: string) => void; /** * The method to call with an editor is ready */ onReady?: (holder?: string) => void; } /** * Default values for each internal map */ export declare const MAP_DEFAULTS: ((string | boolean)[] | (string | { time: number; blocks: any[]; version: string; })[])[]; /** * Injection token for the EditorJS class */ export declare const EDITORJS_MODULE_IMPORT: InjectionToken; /** * The EditorJS class injector */ export declare const EditorJSInstance: InjectionToken>; /** * Options for a Injector method */ export interface InjectorMethodOption { /** * The holder for the option */ holder: string; /** * Optional blocks */ data?: OutputData; /** * Optional editor */ editor?: EditorJS; /** * Don't call save */ skipSave?: boolean; } /** * Options to pass when calling the EditorJS instance API */ export interface InjectorApiCallOptions { /** * Holder for the EditorJS instance */ holder: string; /** * The method to call */ method: string; /** * The optional namespace for the API call */ namespace?: string; } /** * A response from the EditorJS api */ export interface InjectorApiCallResponse extends InjectorApiCallOptions { result: T; } /** * Interface for the injected EditorJS class, returns the static * class of EditorJS with the version and that creates the instance and provides * the Typescript parse with type information */ export interface EditorJSClass extends Function { new (...args: any[]): T; /** * EditorJS version */ version: string; }