Problem/Motivation

With the introduction of a custom skin path in #2671806: Add custom skin support, the UI Color Picker breaks when a custom skin is used.

Steps to reproduce

  1. Create a new folder for skins.
  2. Add a skin inside of it (any skin except those that come bundled with CKEditor).
  3. Edit the Global Profile and set the "Path to the CKEditor skins directory" field to the new skins folder path. Save the page.
  4. Edit the Global Profile and choose one of the new skins. Save the page.
  5. Edit a profile.
  6. Scroll down to the "Editor Appearance" section and expand it.
  7. Scroll down to the area that says "User interface color" and look beneath the dropdown.
  8. When it's working, you should see a basic version of the editor. But in this case, I see a blank area.

Proposed resolution

That blank area is the "skinframe" page which is essentially:
/admin/config/content/ckeditor/skinframe?skin=NAME-OF-SKIN

In the code that generates that page, the call to CKEDITOR.replace('editor', {...}) uses the skin name from the URL query string. But when the editor loads that skin, it loads it from the skins folder inside of the ckeditor path.

The resolution is to change the "skin" JavaScript variable to use a key/value format that ckeditor accepts, i.e. "skin-name,skin-path". For example: "moonocolor,/sites/all/libraries/ckeditor_skins/moonocolor/". We can accomplish this by inserting the skin path from the Global Profile into the JavaScript skin name.

Comments

hargobind created an issue. See original summary.

hargobind’s picture

Status: Active » Needs review
StatusFileSize
new1.18 KB

Attached is a patch which includes the resolution mentioned above.

hargobind’s picture

Issue summary: View changes
vokiel’s picture

Status: Needs review » Reviewed & tested by the community

Confirmed that the patch solves the issue.

Thanks a lot!

  • vokiel committed 96b7873 on 7.x-1.x
    Issue #3250088 by hargobind: UI Color Picker broken with custom skins...
vokiel’s picture

Status: Reviewed & tested by the community » Fixed
hargobind’s picture

Nice! Glad it was so simple. Thanks for being on top of the issue queue and committing this so quickly 😁

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.