1.0.4 • Published 6 months ago

@types/pell v1.0.4

Weekly downloads
190
License
MIT
Repository
github
Last release
6 months ago

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

// Type definitions for pell 1.0
// Project: https://jaredreich.com/pell
// Definitions by: Gabriel Soicher <https://github.com/Lunrtick>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

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: Thu, 08 Jul 2021 20:19:31 GMT
  • Dependencies: none
  • Global values: pell

Credits

These definitions were written by Gabriel Soicher.

1.0.2

8 months ago

1.0.4

6 months ago

1.0.3

7 months ago

1.0.1

3 years ago

1.0.0

4 years ago