function CKEditor5HeightTest::getEditorHeight
Gets the height of ckeditor.
1 call to CKEditor5HeightTest::getEditorHeight()
- CKEditor5HeightTest::testCKEditor5Height in core/
modules/ ckeditor5/ tests/ src/ FunctionalJavascript/ CKEditor5HeightTest.php - Tests editor height respects rows config.
File
-
core/
modules/ ckeditor5/ tests/ src/ FunctionalJavascript/ CKEditor5HeightTest.php, line 88
Class
- CKEditor5HeightTest
- Tests ckeditor height respects field rows config.
Namespace
Drupal\Tests\ckeditor5\FunctionalJavascriptCode
private function getEditorHeight(bool $sourceEditing = FALSE) : int {
$selector = $sourceEditing ? '.ck-source-editing-area' : '.ck-editor__editable';
$javascript = <<<JS
return document.querySelector('{<span class="php-variable">$selector</span>}').clientHeight;
JS;
return $this->getSession()
->evaluateScript($javascript);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.