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

Add support for classes in the alignment plugin #8516

Closed
georgringer opened this issue Nov 24, 2020 · 2 comments · Fixed by #8996
Closed

Add support for classes in the alignment plugin #8516

georgringer opened this issue Nov 24, 2020 · 2 comments · Fixed by #8996
Assignees
Labels
package:alignment type:improvement This issue reports a possible enhancement of an existing feature.

Comments

@georgringer
Copy link

Currently I am checking out the migration of CMS TYPO3 from ckeditor4 to 5. One thing which I am missing is to use classes instead of inline styles for the alignment plugin.

If e.g. right alignment is selected, the text should get <p class="alignment-right"> instead of <p style="texta-align:right".

What do you think about that?

@georgringer georgringer added the type:improvement This issue reports a possible enhancement of an existing feature. label Nov 24, 2020
@Mgsy
Copy link
Member

Mgsy commented Nov 30, 2020

Hi, thanks for the feedback. Could you please tell us more why you would expect to see classes in this case, instead of inline styles?

@Mgsy Mgsy added the pending:feedback This issue is blocked by necessary feedback. label Nov 30, 2020
@georgringer
Copy link
Author

There are a couple of reasions:

  • The content security policy style-src-attr can be configured to ignore inline styles
  • In TYPO3 it is possible to filter attributes which are not allowed by editors and one of those is style. Coming from ckeditor4 and src-view button and other way, you don't want editors to style it through that. The attribute class is allowed
  • E.g. the highlight plugin (https://ckeditor.com/docs/ckeditor5/latest/features/highlight.html) does it with classes as well
  • In the frontend, someone might use the class to add some additional styling via this class

Hope those are enough reasons?

I don't know if any other plugins are using inline styles but all of those should be really avoided.

@Mgsy Mgsy added domain:v4-compatibilty package:alignment and removed pending:feedback This issue is blocked by necessary feedback. labels Dec 15, 2020
@Mgsy Mgsy changed the title Use classes instead of styles for alignment plugin Add support for classes in the alignment plugin Dec 15, 2020
@Reinmar Reinmar added this to the nice-to-have milestone Jan 18, 2021
@Mgsy Mgsy modified the milestones: nice-to-have, iteration 40 Jan 28, 2021
@maxbarnas maxbarnas self-assigned this Feb 4, 2021
@Mgsy Mgsy modified the milestones: iteration 40, iteration 41 Feb 25, 2021
niegowski added a commit that referenced this issue Feb 26, 2021
Feature (alignment): Option to use classes instead of inline styles. Closes #8516.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:alignment type:improvement This issue reports a possible enhancement of an existing feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants