I have an issue with formatting a link in my application. I am using the method documentToHtmlString and I pass in the options like this:
{
renderNode: {
[INLINES.HYPERLINK]: (node, next) => {
console.log(node);
let value = node.content[0]['value'];
let uri = node.data.uri;
return `<a class="test" href="${uri}" data="test" category="contact" data-category="contact" data-action="email" target="_blank">${value}</a>`;
},
},
}
The problem I have is that the renderer ignores most of the attributes. Infact, the only ones it uses is class, href and target. All others are ignored. Does anyone know why?
I was actually using Angular, so if I got my method to return SafeHtml then I was able to bind to innerHtml and all the tags where created find.
This is the basic function I created: