1.0.4 • Published 2 years ago
@types/pell v1.0.4
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.