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

Styles combo disabled when using style with multiple, not sorted classes #727

Closed
f1ames opened this issue Aug 4, 2017 · 11 comments
Closed
Assignees
Labels
plugin:stylescombo The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. support An issue reported by a commercially licensed client. target:minor Any docs related issue that can be merged into a master or major branch. type:bug A bug.
Milestone

Comments

@f1ames
Copy link
Contributor

f1ames commented Aug 4, 2017

Are you reporting a feature request or a bug?

Bug

Check if the issue is already reported

https://dev.ckeditor.com/ticket/13206

Provide detailed reproduction steps (if any)

  1. Open: https://jsfiddle.net/z90dfv8n/
  2. Click on the styles combo.

Alternative steps

  1. Create a minimal CKEditor instance that includes the stylescombo plugin and the styleSet configuration option set to:
[ { name: 'Marker', element: 'span', attributes: { 'class': 'b-test a-test' } } ]
  1. Click on the styles combo.

Expected result

Styles combo shows one style that's named "Marker".

Actual result

Styles combo is empty and disables itself upon clicking on it.

Other details

  • With the class order switched (sorted lexically) the bug does not occur.
  • The (bug-inducing) style is recognized but in this form the ACF filters it out from the styles list.
  • Pasting this snippet:
<p><span class="b-test a-test">Test</span></p>

into the source and switching modes back and forth produces a sorted output like this:

<p><span class="a-test b-test">Test</span></p>
  • Browser: All
  • OS: All
  • CKEditor version: 4.3
  • Installed CKEditor plugins: stylescombo
@f1ames f1ames added plugin:stylescombo The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. type:bug A bug. labels Aug 4, 2017
@saike
Copy link

saike commented Aug 8, 2017

same situation. Styles from styleset not displayed.

@jswiderski jswiderski added the support An issue reported by a commercially licensed client. label Aug 10, 2017
@mlewand mlewand added this to the Backlog milestone Aug 10, 2017
@wojtekw92 wojtekw92 added status:confirmed An issue confirmed by the development team. and removed status:confirmed An issue confirmed by the development team. labels Aug 10, 2017
@wimleers
Copy link
Contributor

Drupal issue: https://www.drupal.org/node/2710431.

@mlewand mlewand added the target:minor Any docs related issue that can be merged into a master or major branch. label Aug 30, 2017
@wwalc
Copy link
Member

wwalc commented Sep 20, 2017

Just a note that there has been already a solution proposed in https://github.com/cksource/ckeditor-dev/commits/t/13206a
which at first glance makes sense (just sort classes as soon as possible, if it works then it's done). Did not check if it works, but normalizing unordered classes seems like the way to go anyway.

@mlewand
Copy link
Contributor

mlewand commented Dec 27, 2017

Could we give it a spin? @msamsel I'll assign you to this ticket so that it's on your list once you're back from holidays 🙂.

@weseze
Copy link

weseze commented Dec 12, 2018

This is still an issue on 4.10.1: not fixed...

@Comandeer
Copy link
Member

@weseze, this issue had very limited scope and was about style combo being disabled or empty after adding style with unsorted classes. That behaviour is no longer reproducible in newer CKEditor.

@BastianBalthasarBux
Copy link

BastianBalthasarBux commented Mar 2, 2019

I can still reproduce with version 4.11.1 ...
Multiple classes need to be sorted alphabetical, otherwise silently removes that style.

@f1ames
Copy link
Contributor Author

f1ames commented Mar 4, 2019

I can confirm that the issue is fixed on latest 4.11.3 version (check here https://jsfiddle.net/p4m25qk0/).

If there is some related issue, it should be reported as a separate ticket. cc @BastianBalthasarBux

@BramDriesen
Copy link

I can still reproduce this on 4.11.3 using the latest Drupal version.

@f1ames
Copy link
Contributor Author

f1ames commented Jun 12, 2019

@BramDriesen maybe it's caused by some specific config. Could you share you config related to styles combo?

@outdoorsman
Copy link

Just cross-linking this issue that I think also showed up in TYPO3... https://stackoverflow.com/questions/54213690/typo3-8-ckeditor-stylesset-multiple-classes-start-classname-with-bg-does-not-w.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin:stylescombo The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. support An issue reported by a commercially licensed client. target:minor Any docs related issue that can be merged into a master or major branch. type:bug A bug.
Projects
None yet
Development

No branches or pull requests