src/Utils/Wysiwyg/Wysiwyg.php
protected function execute($method, $selector = '', array $arguments = [])
    {
        return $this->context->executeJs("return !object.$method(!args);", [
            '!object' => $this->getInstance($selector),
            // Remove "[" character from start of the string and "]" from the end.
            '!args' => substr(drupal_json_encode($arguments), 1, -1),
        ]);
    }
protected function execute($method, $selector = '', array $arguments = [])
    {
        return $this->context->executeJs("return !object.$method(!args);", [
            '!object' => $this->getInstance($selector),
            // Remove "[" character from start of the string and "]" from the end.
            '!args' => substr(drupal_json_encode($arguments), 1, -1),
        ]);
    }
@param string $method
WYSIWYG editor method.
@param string $selector
Editor selector.
@param array $arguments
Arguments for method of WYSIWYG editor.

@throws \Exception
Throws an exception if the editor does not exist.

@return string
Result of JS evaluation.