We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The issue is in line 104-106 of ImperaviRedactorWidget.php, where it says:
if (!empty($this->_plugins)) { $this->options['plugins'] = array_keys($this->_plugins); }
This block should be replaced with:
if(isset($this->options['plugins'])){ $this->setPlugins($this->options['plugins']); $this->options['plugins'] = array_keys($this->_plugins); }
The correct syntax for the configuration in this case would be:
'plugins' => array( 'fontcolor'=>array('js'=>array('fontcolor.js')), 'fontsize'=>array('js'=>array('fontsize.js')), 'fontfamily'=>array('js'=>array('fontfamily.js')) ),
However, this seems a bit complicated to me, so I would propose to replace the setPlugins method with:
public function setPlugins(array $plugins) { foreach ($plugins as $id => $plugin) { if (is_array($plugin)) { if (!isset($plugin['baseUrl']) && !isset($plugin['basePath'])) { $plugin['baseUrl'] = $this->getAssetsUrl() . '/plugins/' . $id; $this->_plugins[$id] = $plugin; } } else { $tmp = array(); $tmp['baseUrl'] = $this->getAssetsUrl() . '/plugins/' . $plugin; $tmp['js'] = array($plugin . '.js'); $this->_plugins[$plugin] = $tmp; } } }
Which would also support the following, much simpler configuration:
'plugins' => array('fontcolor', 'fontsize', 'fontfamily’),
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The issue is in line 104-106 of ImperaviRedactorWidget.php, where it says:
This block should be replaced with:
The correct syntax for the configuration in this case would be:
However, this seems a bit complicated to me, so I would propose to replace the setPlugins method with:
Which would also support the following, much simpler configuration:
The text was updated successfully, but these errors were encountered: