ngx-editor
Version:
Rich Text Editor for angular using ProseMirror
22 lines (21 loc) • 686 B
TypeScript
import { EditorState } from 'prosemirror-state';
import { Command } from 'prosemirror-commands';
declare type Name = 'text_color' | 'text_background_color';
declare type AttrName = 'color' | 'backgroundColor';
interface ColorAttrs {
color: string;
}
interface BackgroundColorAttrs {
backgroundColor: string;
}
declare class TextColor {
name: Name;
attrName: AttrName;
constructor(name: Name, attrName?: AttrName);
apply(attrs: ColorAttrs | BackgroundColorAttrs): Command;
isActive(state: EditorState): boolean;
getActiveColors(state: EditorState): string[];
remove(): Command;
canExecute(state: EditorState): boolean;
}
export default TextColor;