protected function AjaxCssTest::getEditorStyle in Drupal 8
Same name and namespace in other branches
- 9 core/modules/ckeditor/tests/src/FunctionalJavascript/AjaxCssTest.php \Drupal\Tests\ckeditor\FunctionalJavascript\AjaxCssTest::getEditorStyle()
- 10 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.
1 call to AjaxCssTest::getEditorStyle()
- AjaxCssTest::testCkeditorAjaxAddCss in core/
modules/ ckeditor/ tests/ src/ FunctionalJavascript/ AjaxCssTest.php - Tests adding style sheets dynamically to CKEditor.
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);
}