public function Wordcount::getFile in CKEditor Wordcount 8
Same name and namespace in other branches
- 2.x src/Plugin/CKEditorPlugin/Wordcount.php \Drupal\ckwordcount\Plugin\CKEditorPlugin\Wordcount::getFile()
Returns the Drupal root-relative file path to the plugin JavaScript file.
Note: this does not use a Drupal library because this uses CKEditor's API.
Return value
string|false The Drupal root-relative path to the file, FALSE if an internal plugin.
Overrides CKEditorPluginInterface::getFile
See also
https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_resourceManager....
File
- src/
Plugin/ CKEditorPlugin/ Wordcount.php, line 38
Class
- Wordcount
- Defines the "wordcount" plugin.
Namespace
Drupal\ckwordcount\Plugin\CKEditorPluginCode
public function getFile() {
return file_exists(DRUPAL_ROOT . '/libraries/wordcount/plugin.js') ? 'libraries/wordcount/plugin.js' : 'libraries/ckeditor-wordcount-plugin/wordcount/plugin.js';
}