콘텐츠로 이동

types

이 콘텐츠는 아직 번역되지 않았습니다.

type HTMLSchemaOptions = z.infer<typeof HTMLSchema>;

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

const HTMLSchema: ZodDefault<ZodOptional<ZodObject<{
sanitize: ZodOptional<ZodObject<{
allowAttributes: ZodOptional<ZodRecord<ZodString, ZodArray<ZodString, "many">>>;
allowComments: ZodOptional<ZodBoolean>;
allowComponents: ZodOptional<ZodBoolean>;
allowCustomElements: ZodOptional<ZodBoolean>;
allowElements: ZodOptional<ZodArray<ZodString, "many">>;
blockElements: ZodOptional<ZodArray<ZodString, "many">>;
dropAttributes: ZodOptional<ZodRecord<ZodString, ZodArray<ZodString, "many">>>;
dropElements: ZodOptional<ZodArray<ZodString, "many">>;
}, "strip", ZodTypeAny, {
allowAttributes: Record<string, string[]>;
allowComments: boolean;
allowComponents: boolean;
allowCustomElements: boolean;
allowElements: string[];
blockElements: string[];
dropAttributes: Record<string, string[]>;
dropElements: string[];
}, {
allowAttributes: Record<string, string[]>;
allowComments: boolean;
allowComponents: boolean;
allowCustomElements: boolean;
allowElements: string[];
blockElements: string[];
dropAttributes: Record<string, string[]>;
dropElements: string[];
}>>;
}, "strip", ZodTypeAny, {
sanitize: {
allowAttributes: Record<string, string[]>;
allowComments: boolean;
allowComponents: boolean;
allowCustomElements: boolean;
allowElements: string[];
blockElements: string[];
dropAttributes: Record<string, string[]>;
dropElements: string[];
};
}, {
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: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.