types
此内容尚不支持你的语言。
Type Aliases
Section titled “Type Aliases”HTMLSchemaOptions
Section titled “HTMLSchemaOptions”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.
Type Declaration
Section titled “Type Declaration”sanitize?
Section titled “sanitize?”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.
sanitize.allowAttributes?
Section titled “sanitize.allowAttributes?”optional allowAttributes: Record<string, string[]>;
sanitize.allowComments?
Section titled “sanitize.allowComments?”optional allowComments: boolean;
sanitize.allowComponents?
Section titled “sanitize.allowComponents?”optional allowComponents: boolean;
sanitize.allowCustomElements?
Section titled “sanitize.allowCustomElements?”optional allowCustomElements: boolean;
sanitize.allowElements?
Section titled “sanitize.allowElements?”optional allowElements: string[];
sanitize.blockElements?
Section titled “sanitize.blockElements?”optional blockElements: string[];
sanitize.dropAttributes?
Section titled “sanitize.dropAttributes?”optional dropAttributes: Record<string, string[]>;
sanitize.dropElements?
Section titled “sanitize.dropElements?”optional dropElements: string[];
Variables
Section titled “Variables”HTMLSchema
Section titled “HTMLSchema”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.