Aller au contenu

Ce module d’extension active la prise en charge de HTML dans StudioCMS.

  1. Installez le paquet à l’aide de la commande suivante :

    Fenêtre de terminal
    npm run studiocms add @studiocms/html
  2. Votre configuration StudioCMS devrait maintenant inclure @studiocms/html :

    studiocms.config.mjs
    import { defineStudioCMSConfig } from 'studiocms/config';
    import html from '@studiocms/html';
    export default defineStudioCMSConfig({
    plugins: [
    html(),
    ],
    });
type htmlOptions = {
sanitize: {
allowAttributes: Record<string, string[]>;
allowComments: boolean;
allowComponents: boolean;
allowCustomElements: boolean;
allowElements: string[];
blockElements: string[];
dropAttributes: Record<string, string[]>;
dropElements: string[];
};
};