For some reason the Seven theme is hiding the resize icon for CKEditor, here is the culprit code starting at line 142 from ckeditor-dialog.css file:
.cke_reset_all .cke_resizer {
display: none;
}
I do understand theming is all about styling, but what it is not logical here is that a user spend a whole chuck of time debugging why the resize is not working, thinks that CKEditor is not well configured, re-configure what already was properly configured, and then find out the problem is a CSS line of code.
Theme shouldn't hide configuration output, specially not an admin theme.
Comments
Comment #2
altrugon commentedHere goes a patch for it.
Comment #3
altrugon commentedComment #4
altrugon commentedComment #5
benstjohn commentedComment #6
echoz commentedThat was easy, thanks @altrugon !
Patches should be against dev, and since there were no changes in that file, the patch should apply.
Comment #7
altrugon commentedI used on the ticket the Drupal version where I found the bug, but then I created the patch against the dev branch (I checked the bug existed here too ;) ). I'll make sure to change versions next time I upload a patch, wasn't aware of this.
Comment #8
ressaThanks @altrugon. What would be the easiest way to implement this temporarily, until the patch is incorporated? Perhaps inserting the style via a custom module?
Comment #9
tstoecklerSo this was introduced in #2090937: Seven theme: style CKEditor-native dialogs to match Drupal-native dialogs and - I assume - that specific styling was meant to disable the resize icon on dialogs (see the screenshots in that issue). So someone needs to test that that in fact does not re-appear with this patch. Setting back to needs review for that.
Comment #10
tstoecklerComment #11
thpoul commentedThat is correct!
Since #2239419: Include CKEditor's AutoGrow plug-in removed
resizebut only since 8.3.x, I propose to make the.cke_reset_all .cke_resizerselector more specific for 8.2.x which won't cause any regression afterwards.Moving this to the ckeditor issue queue where it actually belongs and setting back to NW.
Comment #12
altrugon commented@ressa I'm applying the patch through composer.json like this:
@tstoeckler, @thpoul: You should remove the resize icon (or any other feature) through the CKEditor configuration not through CSS, this is not what CSS is for. I understand that some people could prefer auto-grow feature (I personally hate it) so you configure your CKEditor properly and then you get your feature, but if in the other case you want to disable it and you do it through the CKEditor configuration, you obviously expect to see the results there.
Perhaps is just me, but there is a clear separation between configuration and style on this scenario.
Comment #13
thpoul commented@altrugon This issue is about #2090937: Seven theme: style CKEditor-native dialogs to match Drupal-native dialogs causing the
resizeicon to be hidden not only for the dialogs but also for the ckeditor itself. This affects only 8.2.x since #2239419: Include CKEditor's AutoGrow plug-in removed theresizeplugin in favor of theautogrow.Also please don't RTBC an issue with your own patch. I have pinged Wim Leers (the maintainer of ckeditor.module) to give feedback. Setting back to NR and to it's proper component.
Comment #14
ressaThanks for sharing your solution @altrugon. I have now added it to my make file. If any else also want to apply the patch in a make file, here is how:
Comment #15
altrugon commented@thpoul I did not RTBC my own ticket, I know you are not suppose to do that. What happened there is that the select box had already that status selected on my browser because I had the tab opened and the only thing I did was reload. Perhaps this is a bug on the ticket report where the values of the select boxes are not properly re-load :(
PS: I had to manually change the status on the select box now, definitely this is a repeating behaviour (bug)
Comment #16
altrugon commentedYou see what I'm talking about, even the component changed. Setting it back to what you had.
Comment #17
wim leers#2090937: Seven theme: style CKEditor-native dialogs to match Drupal-native dialogs was in the component, so then this should also be.
This should be reviewed by people closely involved in that issue. Left a comment there pointing to this issue.
Comment #18
bkosborneUghhh I just spent a lot of time on this. At first I thought the resize plugin was simply not shipped with our version of CKEditor since the icon was not there and because there's no "resize" plugin folder in core/assets/vendor/ckeditor/plguins/, but apparently when you download an optimized version of CKEditor it adds in the plugin files to the main JS file if it can. I tried creating my own plugin integration to add it which of course was not working because it's actually already registered.
Here's a patch that makes the selector more specific to the dialog box, which I'm sure is what was actually intended.
Comment #19
bkosborneI wonder if it's appropriate to bump this to major since it affects user experience so dramatically? The default window height for the editor is so small and it's infuriating being unable to resize it.
Comment #20
thpoul commentedThank you @bkosborne!!
+1 for #18 from me as it addresses the issue I mentioned at #11 and #13 and therefore could go at RTBC. Attaching screenshots from the manual testing I did which correctly shows the icon at the CKEditor body instance but not at the dialog.
One nit I propose is a to add a
todoto remove this css rule when 8.3.x is shipped as it won't have theresizeplugin per #2239419: Include CKEditor's AutoGrow plug-inComment #21
fietserwinI can also confirm that this patch solves the problem at hand. Let's get this in fast, saving hours of frustration for site builders.
Comment #22
wim leersThis looks like a very sane solution.
We can't add tests; Drupal core needs visual regression testing to catch this.
Comment #23
andypostrtbc +1
PS: bartik already works fine
Comment #24
dman commentedAnother x minutes wasted by the team here as we all pointed fingers and tried to remember the last time we saw it, or was it always like this in D8, or has it been made optional somewhere, or are we all just going mad...
Thanks for the fixes, thanks @altrugon . Putting it into our composer.json for now, I guess :-}
Comment #25
ressaIt would be really great if this patch could get included in 8.2.3, if that's possible.
Comment #27
dman commentedThat's just an unrelated testbot infra fail by the looks of things.
Leave this RTBC.
Comment #28
alexpottCommitted and pushed 892272e to 8.3.x and c10b035 to 8.2.x. Thanks!
Comment #32
vgutekunst commentedi have no resize icon in Drupal 8.3.1 and 8.3.2 Whats wrong with the commit?
Comment #33
ressaMy initial thought as well, but at least the CKEditor plugin Auto Grow is now active. Try to add a lot of text in the Body field, and you should see it expand accordingly. Not sure if the resize icon will ever return ...
Comment #34
vgutekunst commentedHi ressa,
yeah i know but the icon should appear too because after a long text the max. height of the editor is reached and the autogrow stops ;-/
Comment #35
echoz commentedWe also need it usually when toggling to "source". That css is still there but does nothing whether deleted or present.
This must have happened with an update to ckeditor, although it looks like the public ckeditor does still have the resize icon.
I for one, want it back, but perhaps this should be a new issue.
Comment #36
vgutekunst commentedis there a solution or a new issue in the meanwhile?
Comment #37
simeThis commit http://cgit.drupalcode.org/drupal/commit/?id=892272e at #28 didn't fix the issue, it simple hid something else. Please
I accept on face value that autogrow not working is a separate bug (I'm seeing the same issue at #32), but we do still need the resize for "source" etc.
Comment #38
simeUpdate, fresh install, autogrow is working for me, so I've created this issue for the "source" mode problem.
https://www.drupal.org/node/2901137
Comment #39
dqdSomehow I do not get it. I now have many big body texts to scroll for ages because there is no option no more to limit the vertical view of the input field. This is a nightmare... How to enable rezise and count of rows to show for body text now?
Comment #40
effulgentsia commentedI opened an issue for that: #2996315: Set autogrow_minHeight to the height of the textarea.