klaro-js icon indicating copy to clipboard operation
klaro-js copied to clipboard

contextualConsent: Enable HTML tags and individual description for each app

Open user123801 opened this issue 2 years ago • 1 comments

The problem

It is not possible to change the wording for contextualConsent for each app individually and we can't use HTML tags in the description. Right now we can only add one description per language using HTML doesn't result in HTML tags.

Proposed solution

Let us use HTML tags and an individual description for each app when using contextualConsent.

Example config

var klaroConfig = {
    translations: {
        en: {
            appName: {
                contextualConsent: {
                    description: "<h3>Something's missing</h3>Do you want to enable {title}?"
                }
            }
       }
    }
}

user123801 avatar Aug 02 '22 14:08 user123801

Hey, I ran into the same problem. I just wrote a pull request for a similar behavior before reading your issue. #449

Do you think HTML is necessary? Although HTML support would be a great addition, I don't think it's required and just implemented it with plain text.

justinrau avatar Oct 14 '22 11:10 justinrau