I have a RichText editor as shown in below screenshot and sample code snippet

enter image description here

<iframe src="" frameborder="0" class="cke_wysiwyg_frame cke_reset" style="width: 100%; height: 100%;" title="Rich Text Editor, question" aria-describedby="cke_74" tabindex="0" allowtransparency="true">

 #document (https://blahbla.com)
<html >
<head>
    <link type="text/css" rel="stylesheet" href="https://cdn.ckeditor.com/4.16.2/standard-all/contents.css?t=L7C8">
    <link type="text/css" rel="stylesheet" href="https://cdn.ckeditor.com/4.16.2/standard-all/plugins/tableselection/styles/tableselection.css">
</head>
    <body contenteditable="true" class="cke_editable cke_editable_themed cke_contents_ltr cke_show_borders" spellcheck="false">
    <p><br></p>
    </body>
</html>
</iframe>

so to type in that rich text editor I’m using below code

const ele = await promisify(cy.get('iframe[title="Rich Text Editor, question"]'));
const body = ele.contents().find("body")[0];
await promisify(cy.wrap(body ).type("My looooong text"))

but above code is very SLOW. It types character by character.

I want to use setData() with coding like below (which is very fast)

it('does work', () => {
  cy.visit('https://ckeditor.com/ckeditor-5/demo/feature-rich/')
      cy.get('.ck-content').contains('Discover')
      cy.get('[data-cke-tooltip-text="Select all (⌘A)"]').click().type('{backspace}')
      cy.get('.ck-content[contenteditable=true]').then(el => {
        // @ts-ignore
        const editor = el[0].ckeditorInstance  // If you're using TS, this is ReturnType<typeof InlineEditor['create']>
        editor.setData('Typing some stuff')
    })
    cy.get('.ck-content').invoke('text').should('eql', 'Typing some stuff')
})

I tried everything. Below is one example I tried

const question = await promisify(cy.get('#frmQuestion iframe[title="Rich Text Editor, question"]'));
          question.contents().find("body")[0].then((el => {
              // @ts-ignore
              const editor = el[0].ckeditorInstance  // If you're using TS, this is ReturnType<typeof InlineEditor['create']>
              editor.setData('Typing some stuff')
          }));

I realized ckeditorInstance NOT available with anything I tried so I’m getting error similar to “cannot execute setData() for undefined”

So my question is how to use setData function instead of type when there is a iFrame and body tag with CKEditor(version 4) ?