Sendgrid template with rich text variable

Hello
Urgently need help
I have an email that I send with sendgrid through a template and the Sendgrid npm system

the problem is that I have an enriched text field linked to a variable in the template and the result is not great
The variable does not take into account the layout

Please post the code you use.

Remove any sensitive data like API Keys.

import sgMail from '@sendgrid/mail';

export function Demandededevis_afterInsert(item, context) {
    sgMail.setApiKey('XXXXXXXXXXXXXX');
 const msg = {
        to: item.prestataireEmail,
 from: 'EMAIL',
        templateId: 'XXXXXXXXXXX',
        dynamic_template_data: {
            nom: item.title,
            email: item.prestataireEmail,
            pax: item.nombrePax,
            deroule: item.richTextDeroule,
            },
    };
    sgMail.send(msg);
}

this is the code of @Code Queen Nayeli (thanks Nayeli)
Thanks so much

Are you using a code template?

Effectively
The problem is that in my template I have a variable which refers to a rich text field in the database.
When the template retrieves the info from my database, it displays the value to me as plain text without layout.
Thank you for your answers and your time