@textbus/editor
Version:
Textbus is a rich text editor and framework that is highly customizable and extensible to achieve rich wysiwyg effects.
25 lines (24 loc) • 1.21 kB
TypeScript
import { VElement, Attribute, FormatValue } from '@textbus/core';
import { Matcher, MatchRule } from './matcher';
import { AttributeLoader } from '@textbus/platform-browser';
export declare class BlockStyleFormatLoader<T extends FormatValue> extends Matcher<T, Attribute<T>> implements AttributeLoader<T> {
styleName: string;
constructor(styleName: string, formatter: Attribute<any>, rule: MatchRule);
match(p: HTMLElement): boolean;
read(node: HTMLElement): {
attribute: Attribute<T>;
value: T;
};
}
export declare class BlockStyleFormatter implements Attribute<string> {
name: string;
styleName: string;
constructor(name: string, styleName: string);
render(host: VElement, formatValue: string): void;
}
export declare const textIndentFormatter: BlockStyleFormatter;
export declare const textAlignFormatter: BlockStyleFormatter;
export declare const blockBackgroundColorFormatter: BlockStyleFormatter;
export declare const textIndentFormatLoader: BlockStyleFormatLoader<FormatValue>;
export declare const textAlignFormatLoader: BlockStyleFormatLoader<FormatValue>;
export declare const blockBackgroundColorFormatLoader: BlockStyleFormatLoader<FormatValue>;