UNPKG

@manuth/woltlab-compiler

Version:

A compiler for generating WoltLab-Package `.tar` Archives and other WoltLab-Package Components

66 lines (65 loc) 1.86 kB
import { IBBCodeAttributeOptions } from "./IBBCodeAttributeOptions.js"; /** * Represents an attribute of a bb-code. */ export declare class BBCodeAttribute { /** * A value indicating whether the attribute is required. */ private required; /** * A value indicating if the value of the attribute - if not present - should be taken by the content of the bb-code. */ private valueByContent; /** * The code that will be appended to the opening HTML-tag of the bb-code. * * `%s` will be replaced by the value of the attribute. */ private code; /** * A regex-pattern for validating the value of the attribute. */ private validationPattern; /** * Initializes a new instance of the {@link BBCodeAttribute `BBCodeAttribute`} class. * * @param options * The options of the attribute. */ constructor(options: IBBCodeAttributeOptions); /** * Gets or sets a value indicating whether the attribute is required. */ get Required(): boolean; /** * @inheritdoc */ set Required(value: boolean); /** * Gets or sets a value indicating if the value of the attribute - if not present - should be taken by the content of the bb-code. */ get ValueByContent(): boolean; /** * @inheritdoc */ set ValueByContent(value: boolean); /** * Gets or sets the code that will be appended to the opening HTML-tag of the bb-code. * * %s will be replaced by the value of the attribute. */ get Code(): string; /** * @inheritdoc */ set Code(value: string); /** * Gets or sets a regex-pattern for validating the value of the attribute. */ get ValidationPattern(): RegExp; /** * @inheritdoc */ set ValidationPattern(value: RegExp); }