2

The XML code I have for the editor form field as

<field name="note_desc" 
  type="editor"
  filter="safehtml" 
  label="Description"
  required="true"
  height="150" />

Irrespective of the defined height 150px it always shows the standard height and width. I am using the default protostar template.

How can I set the editor to consider the height defined?

Update: If I set the default editor as 'None' then the textarea obeys the given height. However the TinyMCE and CodeMirror is not obeying the given height... In the TinyMCE plugin parameters under advanced there is a default option to set the height as 550. This value overrides the value given in the XML form... :-(

1
  • It's a couple months ago the last time I used the editor field, but I remember the case. It's because the editors come with their size.
    – FFrewin
    Nov 13, 2015 at 21:09

3 Answers 3

1

I believe this is a bug in Joomla. The Tiny MCE plugin defaults 550px as height in their plugin parameters and that overrides the height definition in the XML form. I made the below 2 core changes to make it work.

Edit /plugins/timymce/tinymce.xml

Change the default value as '' for the variable 'html_height'

<field name="html_height" type="text"
  default=""
  description="PLG_TINY_FIELD_HTMLHEIGHT_DESC"
  label="PLG_TINY_FIELD_HTMLHEIGHT_LABEL"/>

Edit the /plugins/tinymce/tinymce.php

Search for the value 550 and change as below

$html_height = $this->params->get('html_height', '');

After doing this change the height is taken from my XML form.

1

A patch for this problem has been submitted: https://github.com/joomla/joomla-cms/pull/8591#issuecomment-162313952

0

Instead to change core files, which will be updated probably on next joomla release, and there you need to do the same thing again, I'm suggesting you to use CSS override instead.

.windowclass {min-height: 1000px;height: 1000px !important}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.