Not able to get the value (source content) for CKEditor 5

Created on 7 November 2023, about 1 year ago
jQuery('input.form-submit').on('click', function (e) {
  jQuery('.node-form').find('.required').each(function (i, el) {
    if (jQuery(el).is('textarea') && jQuery(el).data('<strong>editor-active-text-format</strong>')) {
      textarea = jQuery(el);
      var nextEl = textarea.next();
      var iframeObj = nextEl.find('iframe');

      if (iframeObj.length) {
        var content =<strong> iframeObj.contents().find('body').html()</strong>;
        var sample = '<p> <br> </p>'.length;
        <strong>return (sample > content.length)? '': content;</strong>
      } else {
        var source = nextEl.find('<strong>.cke_source</strong>');
        <strong>return(source.val());</strong>
      }
    }
  });
});

This is code working to get the content value for the ckeditor4/ckeditor both source code and normal window
But the same is not working for the ckeditor5

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024