Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple wysiwyg editables with customConfig bug #1124

Closed
chix opened this issue Dec 14, 2016 · 4 comments
Closed

Multiple wysiwyg editables with customConfig bug #1124

chix opened this issue Dec 14, 2016 · 4 comments

Comments

@chix
Copy link
Contributor

chix commented Dec 14, 2016

Bug Report

It is not possible to use multiple wysiwyg document editables with different customConfig files on the same document.

Expected behavior

Each instance of ckeditor should be configured according to passed configuration in customConfig.

Actual behavior

For the scenario described below, the result is OK for w1 and w2, but not for w3 and w4.

Steps to reproduce

In the latest build run this code in your view

<?php
    echo $this->wysiwyg('w1', ['customConfig' => '/cke_max_config.js']);
    echo $this->wysiwyg('w2', ['customConfig' => '/cke_min_config.js']);
    echo $this->wysiwyg('w3', ['customConfig' => '/cke_max_config.js']);
    echo $this->wysiwyg('w4', ['customConfig' => '/cke_max_config.js']);
?>

And use this configs for ckeditor https://gist.github.com/chix/9388101f887d39dbac2c433baf0ea27a (copy them into your web root). You should see, that w3 and w4 are configured with cke_min_config.js instead of cke_max_config.js.

Martin

@chix
Copy link
Contributor Author

chix commented Dec 14, 2016

So it seems to be some caching issue, because if you append a random query string parameter to each customConfig file URL (e.g. '/cke_max_config.js?v=1', '/cke_max_config.js?v=2', ...) it will work.

@brusch
Copy link
Member

brusch commented Jan 20, 2017

But isn't this an issue of CKEditor? customConfig is passed directly to the CKEditor configuration, there's nothing in between from Pimcore.

@chix
Copy link
Contributor Author

chix commented Jan 27, 2017

Yes, you are right. Even a clean html-only example with latest CKEditor behaves the same. I guess there is nothing to do here for Pimcore, so I'm closing this issue. I will have a look at CKEditor's bug tracker and maybe open an issue there. Thanks anyway.

@chix chix closed this as completed Jan 27, 2017
@julkue
Copy link
Contributor

julkue commented Aug 27, 2019

I'm also having the exact same issue. The config gets correctly applied if there's only one configuration per page, but mixing configurations for different editables on the same page causes CKEditor to not correctly apply the configurations, thus I'm seeing a wrong toolbar.

Do you have any tips to resolve this issue @chix @brusch? Do you have a reference to the bug you filled @chix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants