ckeditor5_read_only_mode.module

Same filename and directory in other branches
  1. 10 core/modules/ckeditor5/tests/modules/ckeditor5_read_only_mode/ckeditor5_read_only_mode.module

File

core/modules/ckeditor5/tests/modules/ckeditor5_read_only_mode/ckeditor5_read_only_mode.module

View source
<?php


/**
 * @file
 * Implements hooks for the CKEditor 5 read-only mode test module.
 */
declare (strict_types=1);
use Drupal\Core\Form\FormStateInterface;

/**
 * Implements hook_form_alter().
 */
function ckeditor5_read_only_mode_form_node_page_form_alter(array &$form, FormStateInterface $form_state, string $form_id) : void {
    $form['body']['#disabled'] = \Drupal::state()->get('ckeditor5_read_only_mode_body_enabled', FALSE);
    $form['field_second_ckeditor5_field']['#disabled'] = \Drupal::state()->get('ckeditor5_read_only_mode_second_ckeditor5_field_enabled', FALSE);
}

Functions

Title Deprecated Summary
ckeditor5_read_only_mode_form_node_page_form_alter Implements hook_form_alter().

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.