Commit 52fe3d6f by Frédéric

Test

parent 4ba76c8c
......@@ -32,7 +32,6 @@ class CkEditorEmbedPluginsExtension extends SimpleExtension
return [
JavaScript::create()
->setFileName('js/ckeditor-plugins.js')
->setAttributes(['data-plugins', 'plop, coin, plopcoin'], ['id', 'ckeditor-plugins'])
->setLate(true)
->setPriority(5)
->setZone(Zone::BACKEND),
......@@ -44,9 +43,16 @@ class CkEditorEmbedPluginsExtension extends SimpleExtension
];
}
/**
* @return string
*/
public function loadConfig() {
$config = $this->getConfig();
if (empty($config['plugins'])) {
return '';
}
return '<script type="text/javascript">
const ckeditorPlugins = ['.$this->getConfig()["plugins"].'];
const ckefdsditorPlugins = '.\json_encode($config['plugins']).';
</script>';
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment