Caption on CKEditor with Media embed only allows 128 characters Using Drupal 8, the Media module, and the CKEditor that comes with D8. When you add an image media item, you get your screen like this...


But that caption field only allows 128 characters. Media (I believe) seems to be setting a maxlength of 128 (maxlength="128"). You can still add more characters if you Embed, then edit the source it supplies, but it's still going to chop off what you've added if you double click on that image (it's technically a drupal-entity element) to bring the "Embed media" window up again.

Since this "Caption" field is not dealing with any kind of data/database storage constraints, 1.) can I change this and 2.) does this even make any sense for it to have a maxlength set?

If anyone has a clue how to change it, that'd be most helpful.
This should do the trick no need to install any module, substituting 500 with whatever you want the limit to be

 function mymodule_form_entity_embed_dialog_alter(&amp;$form, $form_state, $form_id) {
      if(isset($form['attributes']['data-caption'])) {
        $form['attributes']['data-caption']['#maxlength'] = '500';
      }
    }