textarea height - cke

edited May 2014 in Modules
Hi

In my module, I've declared:
$fields['bio']['label'] = 'Bio'; $fields['bio']['rows'] = 30;
I have fuel configured for CKEditor.

According to the Form docs, ['rows'] should allow me to adjust the display height for my rich text area. It doesn't seem to work though. Am I missing something?

Thanks.

Comments

  • edited 4:10AM
    You can also try using style:
    $fields['bio']['style'] = 'height: 300px';
  • edited 4:10AM
    Both combinations successfully adjust the underlying but the cke editor still appears at the same height.

    It must be a cke thing. I'll investigate and report back...
  • edited 4:10AM
    Fixed it!

    This is probably worth adding to the repo.

    In ./fuel/modules/fuel/assets/js/fuel/custom_fields.js add around line 132:
    // add custom configs config = $.extend(config, $(elem).data()); var hasCKEditorImagePlugin = (config.extraPlugins && config.extraPlugins.indexOf('fuelimage') != -1); /*+++*/ config.height = $(elem).height(); //make cke height same as parent textarea dom height. CKEDITOR.replace(ckId, config);
  • edited 4:10AM
    So. If I want to customise the height of my body field in Pages (#vars--body), is there something in ./application/config/ I can edit to set along the lines of:

    $fields['bio']['style'] = 'height: 300px';
  • edited 4:10AM
    That seems to be ./applications/config/MY_fuel_layouts.php

    'fields' => array('body' => array('label' => lang('layout_field_body'), 'type' => 'textarea', 'description' => lang('layout_field_body_description'), 'rows'=>'40'))

    'style' => 'height: 300px' doesn't seem to work but 'rows' is sufficient
  • edited 4:10AM
    Thanks for the fix for setting the CKEditor height. I've added a patch in the develop branch which will be included in the next release.
Sign In or Register to comment.