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

1.0.4 • Public • Published

Installation

npm install --save @types/pell

Summary

This package contains type definitions for pell (https://jaredreich.com/pell).

Details

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

index.d.ts

export as namespace pell;

export interface PellElement {
    content: HTMLDivElement;
}

export function init<T extends HTMLElement>(c: pellConfig<T>): T & PellElement;
export function exec(command: string, value?: string): void;

export interface pellConfig<T extends HTMLElement> {
    element: T;
    onChange: (html: string) => void;
    defaultParagraphSeparator?: string | undefined;
    styleWithCSS?: boolean | undefined;
    actions: pellAction[];
    classes?: pellClasses | undefined;
}

export interface pellClasses {
    actionbar?: string | undefined;
    button?: string | undefined;
    content?: string | undefined;
    selected?: string | undefined;
}

export type pellAction = pellBuiltinAction | pellActionConfig | pellCustomActionConfig;
export interface pellActionConfig {
    name: pellAction;
    icon?: string | undefined;
    title?: string | undefined;
    result: () => void;
}
export interface pellCustomActionConfig {
    name?: string | undefined;
    icon: string;
    title?: string | undefined;
    result: () => void;
}

export type pellBuiltinAction =
    | "bold"
    | "italic"
    | "underline"
    | "strikethrough"
    | "heading1"
    | "heading2"
    | "paragraph"
    | "quote"
    | "olist"
    | "ulist"
    | "code"
    | "line"
    | "link"
    | "image";

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:39 GMT
  • Dependencies: none

Credits

These definitions were written by Gabriel Soicher.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/pell

Weekly Downloads

863

Version

1.0.4

License

MIT

Unpacked Size

5.1 kB

Total Files

5

Last publish

Collaborators

  • types