13. Posted June 10, 2019 Share 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. Link to comment Share on other sites More sharing options...
Solution Stuart Silvester Posted June 10, 2019 Solution Share 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) 13. 1 Link to comment Share on other sites More sharing options...
sobrenome Posted November 11, 2020 Share 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? Link to comment Share on other sites More sharing options...
Recommended Posts