clarkwinkelmann That's a template parameter, you can change it on the renderer itself with something like this:
$renderer->setParameter('MEDIAEMBED_THEME', 'dark');
You only have to set it once, but nothing bad happens if you overwrite it before every call to the renderer. You can also configure the renderer used for live preview the same way:
s9e.TextFormatter.setParameter('MEDIAEMBED_THEME', 'dark');
Make sure the API is exported:
diff --git a/framework/core/src/Formatter/Formatter.php b/framework/core/src/Formatter/Formatter.php
index 2dbc97c..a219696 100644
--- a/framework/core/src/Formatter/Formatter.php
+++ b/framework/core/src/Formatter/Formatter.php
@@ -121,7 +121,7 @@ class Formatter
$configurator->rendering->getEngine()->cacheDir = $this->cacheDir; // @phpstan-ignore-line
$configurator->enableJavaScript();
- $configurator->javascript->exports = ['preview'];
+ $configurator->javascript->exports = ['preview', 'setParameter'];