跳转到内容

types

此内容尚不支持你的语言。

type HTMLSchemaOptions = {
sanitize?: {
allowAttributes?: Record<string, string[]>;
allowComments?: boolean;
allowComponents?: boolean;
allowCustomElements?: boolean;
allowElements?: string[];
blockElements?: string[];
dropAttributes?: Record<string, string[]>;
dropElements?: string[];
};
};

Defined in: studiocms/packages/@studiocms/html/src/types.ts:19^

Defines the schema for HTML configuration options.

The schema includes an optional sanitize property, which is validated using the StudioCMSSanitizeOptionsSchema. If no value is provided, the default is an empty object.

optional sanitize: {
allowAttributes?: Record<string, string[]>;
allowComments?: boolean;
allowComponents?: boolean;
allowCustomElements?: boolean;
allowElements?: string[];
blockElements?: string[];
dropAttributes?: Record<string, string[]>;
dropElements?: string[];
} = StudioCMSSanitizeOptionsSchema;

Sanitization options for HTML content. See StudioCMSSanitizeOptionsSchema for details.

optional allowAttributes: Record<string, string[]>;
optional allowComments: boolean;
optional allowComponents: boolean;
optional allowCustomElements: boolean;
optional allowElements: string[];
optional blockElements: string[];
optional dropAttributes: Record<string, string[]>;
optional dropElements: string[];

const HTMLSchema: ZodDefault<HTMLSchemaOptions>;

Defined in: studiocms/packages/@studiocms/html/src/types.ts:11^

Defines the schema for HTML configuration options.

The schema includes an optional sanitize property, which is validated using the StudioCMSSanitizeOptionsSchema. If no value is provided, the default is an empty object.