You are here

protected function CkEditorContext::getContent in Lightning Core 8.5

Same name and namespace in other branches
  1. 8 tests/contexts/CkEditorContext.behat.inc \Acquia\LightningExtension\Context\CkEditorContext::getContent()
  2. 8.2 tests/contexts/CkEditorContext.behat.inc \Acquia\LightningExtension\Context\CkEditorContext::getContent()
  3. 8.3 tests/contexts/CkEditorContext.behat.inc \Acquia\LightningExtension\Context\CkEditorContext::getContent()
  4. 8.4 tests/contexts/CkEditorContext.behat.inc \Acquia\LightningExtension\Context\CkEditorContext::getContent()

Gets the content of a CKEditor instance.

Parameters

string $id: (optional) The editor instance ID.

Return value

string The HTML content of the editor.

2 calls to CkEditorContext::getContent()
CkEditorContext::assertEditorContains in tests/contexts/CkEditorContext.behat.inc
Asserts that a CKEditor's content contains a snippet of text.
CkEditorContext::assertEditorMatch in tests/contexts/CkEditorContext.behat.inc
Assert that a CKEditor's content matches a regular expression.

File

tests/contexts/CkEditorContext.behat.inc, line 117

Class

CkEditorContext
Contains step definitions for working with CKEditor instances.

Namespace

Acquia\LightningExtension\Context

Code

protected function getContent($id = NULL) {
  $js = $this
    ->assertEditor($id);
  return $this
    ->getSession()
    ->evaluateScript("{$js}.getData()");
}