I manage to configure the HTMLPurifier.
In site/ready.php, I put this:
$wire->addHookAfter('MarkupHTMLPurifier::initConfig', function (HookEvent $event) {
$config = $event->arguments(0);
$def = $event->arguments(1);
$def->addElement('details', 'Flow', 'Flow', 'Common');
$def->addElement('summary', 'Flow', 'Flow', 'Common');
});
I got that addElement method from there: https://github.com/processwire/processwire-requests/issues/226
Don’t ask me about the three other arguments (Flow, Flow, Common). 😅
That + a config.json file for this specific field where you specify the accordion plugin and the accordion button in the toolbar, as you mentioned above, and it works fine.