function 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 98  
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);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.