Open
Description
Recently I updated both Grav (v1.7.33
) and shortcode-core (v5.1.1
). Since then a third party plugin stopped working.
It seems that shortcode-core doesn't load assets at all. On a clean plugin sample (using the [strike]
shortcode from shortcode-core main page) I successfully get the formatted string (with <del>
) but trying to add assets (either js
or css
) doesn't seem to work.
The code is really simple:
public function init()
{
$this->shortcode->getHandlers()->add('strike', function(ShortcodeInterface $sc) {
$this->shortcode->addAssets('js', 'plugin://test-plugin/js/alert.js');
$this->shortcode->addAssets('inlinejs', 'alert("-");');
$this->shortcode->addAssets('inlinejs', 'console.log("-");');
$this->shortcode->addAssets('css', 'plugin://test-plugin/css/helloworld.css');
return '<del>'.$sc->getContent().'</del>';
});
}
Only the <del>
part gets successfully added and rendered.
Am I doing something wrong?