Skip to content

Commit

Permalink
Fixed List Plugin toolbar effect for slideouts
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Aug 12, 2023
1 parent d6384a0 commit 1950eb2
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
6 changes: 4 additions & 2 deletions src/controllers/CkeConfigsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function actionEdit(?CkeConfig $ckeConfig = null, ?string $uid = null): R
'shortcut' => true,
'retainScroll' => true,
])
->prepareScreen(function(Response $response) use ($ckeConfig) {
->prepareScreen(function(Response $response, $containerId) use ($ckeConfig) {
$jsonSchemaUri = sprintf('https://craft-code-editor.com/%s', $this->view->namespaceInputId('config-options-json'));
/** @var Response|CpScreenResponseBehavior $response */
$response->contentTemplate('ckeditor/cke-configs/_edit.twig', [
Expand All @@ -91,14 +91,16 @@ public function actionEdit(?CkeConfig $ckeConfig = null, ?string $uid = null): R
fn(
$toolbarBuilderId,
$configOptionsId,
$containerId,
$jsonSchemaUri,
) => <<<JS
const configOptions = new CKEditor5.craftcms.ConfigOptions($configOptionsId, $jsonSchemaUri);
new CKEditor5.craftcms.ToolbarBuilder($toolbarBuilderId, configOptions);
new CKEditor5.craftcms.ToolbarBuilder($toolbarBuilderId, $containerId, configOptions);
JS,
[
$this->view->namespaceInputId('toolbar-builder'),
$this->view->namespaceInputId('config-options'),
$containerId,
$jsonSchemaUri,
],
);
Expand Down
Loading

0 comments on commit 1950eb2

Please sign in to comment.