Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted June 10, 20195 yr Hello. I need to allow to post an attribute like data-customanchor="value", what is the correct way to do that? I've tried to play around with setting "Allowed javascript controllers" in editor's settings, but didn't figured out how to use it (also did not found any examples or docs on how to use this setting). Thanks.
June 10, 20195 yr Solution You would need to write a plugin to overload \IPS\Text\Parser::_htmlPurifierModifyHtmlDefinition() to whitelist your custom attribute on the chosen tag. I would recommend taking a look at that method to see how we're whitelisting certain attributes. Allowed JavaScript controllers is purely for controllers (data-controller attributes that we use to load JS)
November 11, 20204 yr On 6/10/2019 at 1:47 PM, Stuart Silvester said: Allowed JavaScript controllers is purely for controllers (data-controller attributes that we use to load JS) Is there a guide for available data-controller?