@textbus/editor
Version:
Textbus is a rich text editor and framework that is highly customizable and extensible to achieve rich wysiwyg effects.
21 lines (20 loc) • 873 B
TypeScript
import { Attribute, FormatValue, VElement } from '@textbus/core';
import { Matcher, MatchRule } from './matcher';
import { AttributeLoader } from '@textbus/platform-browser';
export declare class BlockAttrLoader<T extends FormatValue> extends Matcher<T, Attribute<T>> implements AttributeLoader<any> {
attrName: string;
constructor(attrName: string, attribute: Attribute<T>, rule: MatchRule);
match(p: HTMLElement): boolean;
read(node: HTMLElement): {
attribute: Attribute<T>;
value: T;
};
}
export declare class BlockAttrFormatter implements Attribute<string> {
name: string;
attrName: string;
constructor(name: string, attrName: string);
render(host: VElement, formatValue: FormatValue): void;
}
export declare const dirFormatter: BlockAttrFormatter;
export declare const dirFormatLoader: BlockAttrLoader<FormatValue>;