https://cypress.io logo
Unable to test typing into CKEditor 5 with Cypress...
# i-need-help
w
Hello all! I've been trying to get cypress to type into a CKEditor v5 instance for a while now, I previously had this working in earlier versions of Cypress (maybe v9) but am unable to get it to work currently. It is able to run keyboard commands like select-all (Ctrl + A) and Delete, but typing text in the same element doesn't seem to do anything. Please see the failing test below.
Copy code
describe('CKEditor 5', () => {
    it('types text into a CKEditor 5 editor instance and tests to make sure the text equals whatever is typed in', () => {
      cy.visit('https://ckeditor.com/ckeditor-5/demo/feature-rich/')
      cy.get('div[data-demo-type="feature-rich"] div[contenteditable]').type('{ctrl+a}{del}')
      cy.get('div[data-demo-type="feature-rich"] div[contenteditable]').type('Hello CKEditor')
      cy.get('div[data-demo-type="feature-rich"] div[contenteditable]').invoke('text').should('eq', 'Hello CKEditor')
    })
  })