public function FontCKEditorButton::validateFontValue in CKEditor Font Size and Family 8
#element_validate handler for the "font" element in settingsForm().
Parameters
array $element:
FormStateInterface $form_state:
File
- src/
Plugin/ CKEditorPlugin/ FontCKEditorButton.php, line 179
Class
- FontCKEditorButton
- Defines the "font" plugin.
Namespace
Drupal\ckeditor_font\Plugin\CKEditorPluginCode
public function validateFontValue(array $element, FormStateInterface $form_state) {
if ($this
->generateFontStyleSetting($element['#value'], 'font') === FALSE) {
$form_state
->setError($element, t('The provided list of fonts is syntactically incorrect.'));
}
}