public function ScaytCKEditorButton::getCkEditorVersion in CKEditor SpellCheckAsYouType (SCAYT) 8
Returns current version of CKEditor.
Return value
string CKEditor version (either 4.13, 4.14 or 4.15 (for any other version)).
2 calls to ScaytCKEditorButton::getCkEditorVersion()
- ScaytCKEditorButton::getButtons in src/
Plugin/ CKEditorPlugin/ ScaytCKEditorButton.php - NOTE: The keys of the returned array corresponds to the CKEditor button names. They are the first argument of the editor.ui.addButton() or editor.ui.addRichCombo() functions in the plugin.js file.
- ScaytCKEditorButton::getLibraryPath in src/
Plugin/ CKEditorPlugin/ ScaytCKEditorButton.php
File
- src/
Plugin/ CKEditorPlugin/ ScaytCKEditorButton.php, line 158
Class
- ScaytCKEditorButton
- Defines the "scayt" plugin.
Namespace
Drupal\ckeditor_scayt\Plugin\CKEditorPluginCode
public function getCkEditorVersion() {
$library = $this->libraryDiscovery
->getLibraryByName('core', 'ckeditor');
$version = $library['js'][0]['version'];
$pluginVersion = strpos($version, '4.13') !== FALSE ? '4.13' : (strpos($version, '4.14') !== FALSE ? '4.14' : '4.15');
return $pluginVersion;
}