Is there a way to be able to use style attributes in packs to style the text? I want to improve accessibility of the pages by allowing users to set a font-size preference and wrote a pack to do it but the style attributes seem to get stripped by the HTML sanitizer.
pack.addFormula({
name: "FormatFontSize",
description: "Formats to a custom font size",
parameters: [
coda.makeParameter({
type: coda.ParameterType.String,
name: "text",
description: "The text to format to font size",
}),
coda.makeParameter({
type: coda.ParameterType.String,
name: "size",
description: "The font size",
}),
],
resultType: coda.ValueType.String,
codaType: coda.ValueHintType.Html,
execute: async function ([text, size]) {
return `<div style="color:blue;font-size:${size};">${text}</div>`
},
});