Rich text in BodyTemplates


#1

Hi
Is is possible use rich text markup in BodyTemplates ?

It appears to be possible in Amazon’s documentation, and it looks like from the response logs that they are set to rich by default, but I can’t work out the correct syntax to use (or if do in fact need to specify richText). Can anyone point me to any examples?

Thanks


#2

Yes, it’s possible
https://developer.amazon.com/docs/custom-skills/display-interface-reference.html#supported-markup

Here’s an example

const bodyTemplate = new BodyTemplate1();
bodyTemplate.setTextContent(`
            Normal <b>Bold</b> <i>Italic</i>
            `);
this.$alexaSkill.showDisplayTemplate(bodyTemplate).tell('Hello');

#3

Thanks Alex, got it.
I think my issue was I was trying to add tags to the title rather than the textContent - it looks like it’s not possible on Title. Thanks.
Tom