public function CkEditorContext::insert in Lightning Core 8.2
Same name and namespace in other branches
- 8.5 tests/contexts/CkEditorContext.behat.inc \Acquia\LightningExtension\Context\CkEditorContext::insert()
- 8 tests/contexts/CkEditorContext.behat.inc \Acquia\LightningExtension\Context\CkEditorContext::insert()
- 8.3 tests/contexts/CkEditorContext.behat.inc \Acquia\LightningExtension\Context\CkEditorContext::insert()
- 8.4 tests/contexts/CkEditorContext.behat.inc \Acquia\LightningExtension\Context\CkEditorContext::insert()
Puts text or HTML into a CKEditor instance.
@When I put :text into CKEditor @When I put :text into CKEditor :id
Parameters
string $text: The text (or HTML) to insert into the editor.
string $id: (optional) The editor instance ID.
File
- tests/
contexts/ CkEditorContext.behat.inc, line 52
Class
- CkEditorContext
- Contains step definitions for working with CKEditor instances.
Namespace
Acquia\LightningExtension\ContextCode
public function insert($text, $id = NULL) {
$js = $this
->assertEditor($id);
$this
->getSession()
->executeScript("{$js}.insertHtml('{$text}');");
}