protected function AjaxCssTest::getEditorStyle in Drupal 10
Same name and namespace in other branches
- 8 core/modules/ckeditor/tests/src/FunctionalJavascript/AjaxCssTest.php \Drupal\Tests\ckeditor\FunctionalJavascript\AjaxCssTest::getEditorStyle()
- 9 core/modules/ckeditor/tests/src/FunctionalJavascript/AjaxCssTest.php \Drupal\Tests\ckeditor\FunctionalJavascript\AjaxCssTest::getEditorStyle()
Gets a computed style value for a CKEditor instance.
Parameters
string $instance_id: The CKEditor instance ID.
string $attribute: The style attribute.
Return value
string The computed style value.
File
- core/
modules/ ckeditor/ tests/ src/ FunctionalJavascript/ AjaxCssTest.php, line 97
Class
- AjaxCssTest
- Tests delivery of CSS to CKEditor via AJAX.
Namespace
Drupal\Tests\ckeditor\FunctionalJavascriptCode
protected function getEditorStyle($instance_id, $attribute) {
$js = sprintf('CKEDITOR.instances["%s"].document.getBody().getComputedStyle("%s")', $instance_id, $attribute);
return $this
->getSession()
->evaluateScript($js);
}