This issue duplicates another issue.
-
Sencha User
[4.2.0.265 beta] BUG: HtmlEditor Textarea Height always 100px
REQUIRED INFORMATIONExt version tested:
Browser versions tested against:
- Chrome
- FF 18.1 (firebug 1.11 installed)
DOCTYPE tested against:
Description:
- The textarea inside the html editor is always 100px in height. Evn if htmleditor height is set higher.
Steps to reproduce the problem:
- Create a htmleditor with height greater than 100px.
The result that was expected:
- Input area should stretch to the height of htmleditor.
The result that occurs instead:
- HtmlEditor height is set correctly.
- Input textarea height stays 100px.
Test Case:
Code:
Ext.create('Ext.panel.Panel',{
title: 'HTML Editor',
width: 550,
height: 250,
frame: true,
layout: 'fit', //Layout also has no effect
items: {
xtype: 'htmleditor',
enableColors: false,
enableAlignments: false
}
});
HELPFUL INFORMATION
Screenshot or Video:
htmleditor.png
See this URL for live test case: http://
Debugging already done:
Possible fix:
- The textarea is created with: size : 'height:100px;width:100%
- But its never resized according to the editor height.
Additional CSS used:
- only default ext-all.css
- custom css (include details)
Operating System:
-
Sencha User
Temp workaround
Code:
{
xtype: 'htmleditor',
listeners: {
afterrender: function () {
var el = this.el,
textArea = el.down('textarea'),
iframe = el.down('iframe');
textArea.applyStyles({height:'100%'});
iframe.applyStyles({height:'100%'});
}
}
}
-
Ext JS Premium Member
I think it's a typo in Ext.form.field.HtmlEditor.getInputCmpCfg. Should be:
Code:
...
data = {
...
size : 'height:100%;width:100%'
};
...
-
This is a known issue: EXTJSIV-8074
Thanks for posting.
Twitter - @evantrimboli
Former Sencha framework engineer, available for consulting.
As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.
-
Sencha User
It's not a typo. It is the same in 4.1.1.
But in 4.1.1 exists a custom HtmlEditor layout that possibly resizes that later.
As of 4.2.0 beta they have refactored HtmlEditor as a FieldContainer descendant and have given it a standard VBox layout.