-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Can't remove block style after changing format #3649
Comments
Upon switching to source mode and back, the leftover style is removed. This means ACF doesn't allow it and it should be in fact removed when using I think the proper approach could be checking if new element (upon using |
@f1ames, please note that both tickets mention reset. If you apply it the way you have described (ACF wise) you will not change current behavior much. Please also consider an example where you have e.g. Red H1 style, no Red P style but red font color is allowed for P by ACF. In described case, you will be left with Red P style which you shouldn't be able to create because it hasn't been defined anywhere (in any dropdown). |
Info from original bug reporter:
|
@jswiderski could you tell more how you would see this features integration? It's quite misleading because we have both format and style plugins which seems to have the same purpose and probably could be configured with the same list of styles/formats. It causes me wondering how it should work in the first place between both plugins. Use cases: Applying format to inline style
Actual
Applying format to block style (and reverse).
Actual Current state of styles featureI find out it a bit inconsistent that some of our styles like mentioned Italic Title set inline styles instead of semantic HTML. With semantic HTML, ACF won't remove styles when moving from Italic Title to a normal format. It seems still incorrect in the context of the issue ticket, but at least won't produce invalid editor content. Also, note that you can actually toggle styles and remove them using Remove Format plugin, so maybe current behavior (except ACF issue) should be treated as a feature, not a bug? It seems natural for me that the previous style is not removed but extended, however, I could miss the point of the whole feature as two standalone plugins that shouldn't cooperate. |
@jswiderski could you take a look on a previous #3649 (comment) ? |
I don't mind the difference between inline and block styles because they behave differently. Inline styles can be copied to the next line on Enter key press and have the Remove Format button which allows erasing them. Block styles are one-line styles (you can't continue them on Enter) and have no Remove Format option thus I think it is should work in a way that when you change one block style to the other (or other format), the whole block (including styling) element should be replaced with the new one. For example if you have Please also note this is not about ACF. In cases where it is disabled, you will be left out with styles like |
@jswiderski we are working on the issue with @jacekbogdanski (there is already a PR: #4181) but we would like to ask you to confirm if we understand it correctly. Below I put a number of use cases with a proposed result, please take a look if everything is as you'd expect it. Also you can add more examples if you find them helpful or important.
|
Closed in #4181 |
Type of report
Bug
Provide detailed reproduction steps (if any)
Old issue: https://dev.ckeditor.com/ticket/12526
Expected result
Plain paragraph of text should be produced -
<p>test</p>
One style/format should reset other style.
Actual result
Paragraph with italic title is produced -
<p style="font-style:italic">test</p>
The same thing is happening when you have a style without any styles defined (which maybe isn't super correct but it is possible in the editor) e.g.
If you first apply 'Heading 1' and then 'Normal Para', you will end up with Red Paragraph having Arial font family assigned.
Other details
The text was updated successfully, but these errors were encountered: