@types/editorjs__header
TypeScript icon, indicating that this package has built-in type declarations

2.6.3 • Public • Published

Installation

npm install --save @types/editorjs__header

Summary

This package contains type definitions for @editorjs/header (https://github.com/editor-js/header#readme (Does not have to be to GitHub).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/editorjs__header.

index.d.ts

interface HeaderData {
    text: string;
    level: number;
}

interface HeaderConfig {
    placeholder: string;
    levels: number[];
    defaultLevel: number;
}

interface Level {
    number: number;
    tag: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
    svg: string;
}

declare class Header {
    constructor(config?: { data: HeaderData; config: HeaderConfig; api: object; readOnly: boolean });

    normalizeData(data: HeaderData): HeaderData;

    setLevel(level: number): void;

    merge(data: HeaderData): void;

    validate(blockData: HeaderData): boolean;

    save(toolsContent: HTMLElement): HeaderData;

    static get conversionConfig(): { export: string; import: string };

    static get sanitize(): { level: boolean; text: object };

    static get isReadOnlySupported(): boolean;

    get data(): HeaderData;

    set data(data: HeaderData);

    getTag(): HTMLElement;

    get currentLevel(): Level;

    get defaultLevel(): Level;

    get levels(): Level[];

    static get toolbox(): {
        icon: string;
        title: string;
    };
}

export default Header;

Additional Details

  • Last updated: Mon, 06 Nov 2023 22:41:05 GMT
  • Dependencies: none

Credits

These definitions were written by Maykon Oliveira.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/editorjs__header

Weekly Downloads

10,290

Version

2.6.3

License

MIT

Unpacked Size

4.83 kB

Total Files

5

Last publish

Collaborators

  • types