function MediaTest::leaveSourceMode

Leaves source mode and returns to the CKEditor iframe.

File

core/modules/ckeditor/tests/src/FunctionalJavascript/MediaTest.php, line 1411

Class

MediaTest
@coversDefaultClass \Drupal\ckeditor\Plugin\CKEditorPlugin\DrupalMedia[[api-linebreak]] @group ckeditor @group legacy

Namespace

Drupal\Tests\ckeditor\FunctionalJavascript

Code

protected function leaveSourceMode() {
  // Press the source button again to leave source mode.
  $this->pressEditorButton('source');
  // Having entered source mode means we need to reassign an ID to the
  // CKEditor iframe.
  $this->assignNameToCkeditorIframe();
  $this->getSession()
    ->switchToIFrame('ckeditor');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.