Closed (duplicate)
Project:
CKEditor 4 - WYSIWYG HTML editor
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
11 Sep 2012 at 13:41 UTC
Updated:
26 Jan 2015 at 20:49 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
mkesicki commented@Diogenes,
thank you for patch. We try check this as soon as possible.
Comment #2
bbcThanks for this. The patch works nicely. Any pointers for making this work on content types where a field has unlimited values?
I'm hoping that there's an easy way to put a regular expression in the case such that any of the following would match, but haven't been having any luck so far.
Thanks!
Comment #3
Diogenes commentedGood question. It wasn't clear to me how these index numbers were generated. Now it is.
You can add multiple case statements for the same block of code or you could add a default case statement block that would render each case of the unlimited set to be the same size. See if that works.
-Dio
Comment #4
k3vin_nl commentedI had the same issue and took a different approach to fix it by adding a bit of custom javascript via a module.
The script checks the number of rows the original textarea was set to and scales the editor accordingly, if it is of use to anyone, I have attached it here.
Comment #5
wranvaud commentedDiogenes method works although I had to change the id from edit-body-und-0-summary to edit-body-en-0-summary.
This would be a nice patch to be included on the module (wysiwyg and/or ckeditor). It's a very useful feature.
Comment #6
Diogenes commented@Willnux - good catch there!
I have never really understood how the language thingy works and after spending a morning trying to figure it out, I'm totally confounded.
I enabled the Locale and Content Translation modules, added another language, enabled multi lingual support on the content type, and added some new content in the new language. After I save this and look at the entry in the field_data_body table, it is ALWAYS 'und' in the language column. AFAIK, the ckeditor module uses this field to create the element id - so no matter how I have things configured, the textarea_id is always edit-body-und-0-value.
What am I missing?
Update: after reading this and this and this, I get the impression this used to work in D6 but does not work in D7. Arrrgh!!!
At any rate here is a slightly modified version of the Drupal.textareaSize() that will hopefully handle these situations. NOTE: no point using this for D7
I really doubt this is the best way to do things, but it's a start.
Comment #7
Diogenes commented@K3vin - Kudos to ya kid. I like your idea better than mine. Can you reroll it as a patch for this module?
Comment #8
k3vin_nl commented@Diogenes, sure no problem. Kinda busy now, so might take some time!
Comment #9
Renee S commentedK3vin: this is lovely, thanks, I just added it to my theme's js and it works perfectly.
Comment #10
shaundychko#4 works great.
Comment #11
shaundychkoComment #12
mengi commentedIs this issue a duplicate of #1154730?
Comment #13
k3vin_nl commentedI think so. And it looks like the solution in #1154730 is much nicer!
Comment #14
mengi commentedTest patch in number #11 and it works.
The patch in #1154730 (looks to be a duplicate issue) works as well. The patches take different approaches to adjustable the height of the widget. The patch in #1154730 gives a more accurate height in my opinion. Patch in #11 seems to add additional rows to the fields row number. The shortest I could get it was 5 rows.
Comment #15
damienmckennaClosing this as it's a duplicate of #1154730: CKEditor not following body rows setting Drupal 7.