Write the content of an editor of the form (TinyMCE, CodeMirror or the plain editor) through Joomla's editor API, so the same step fits every editor. With no field named, the only editor of the page is used.
Examples
When I fill in the rich text editor with "<p>Hello</p>"
When I fill in the rich text editor field "Article Text" with "<p>Hello</p>"
When we fill in the rich text editor field "jform_articletext" with "Some text"
And I fill in the rich text editor field "Content" with "<p>Notice</p>"
When fill in the rich text editor with "Text"
Pattern
When(/^(I |we )*fill in the rich text editor(?: field "([^"]*)?")? with "([^"]*)?"$/, …)
Part of @webship-js/joomla-steps (github.com/webship/joomla-steps), a step pack for Webship-js 2.0.x.