Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
aia Posted June 10, 2019 Posted June 10, 2019 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.
Solution Stuart Silvester Posted June 10, 2019 Solution Posted June 10, 2019 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) aia 1
sobrenome Posted November 11, 2020 Posted November 11, 2020 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?
Recommended Posts