PDA

View Full Version : [CLOSED] Use of HTMLEditor inside FieldContainer



cleve
Feb 19, 2013, 8:14 AM
I am not sure if it's permitted. The code:




<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<body id="theBody">
<ext:ResourceManager ID="theManager" runat="server"
IDMode="Static"
ShowWarningOnAjaxFailure="false"
DirectMethodProxy="Ignore"
ScriptMode="Debug">
</ext:ResourceManager>
<ext:Button runat="server" Text="DD">
<Listeners>
<Click Handler="testFunc(#{winMain});" />
</Listeners>
</ext:Button>
<ext:Window runat="server" ID="winMain" Modal="true" Hidden="true"
Resizable="false" Width="300" Height="350" Border="false" Layout="FormLayout">
<Items>
<ext:FieldContainer runat="server" Height="200" FieldLabel="TEXT"
LabelWidth="50" Layout="FitLayout">
<Items>
<ext:HtmlEditor runat="server" />
</Items>
</ext:FieldContainer>
</Items>
</ext:Window>
<script type="text/javascript">


var testFunc = function (win) {
win.show();
}


</script>


</body>
</html>




Looks like HTMLEditor failed to response to any events.

Daniil
Feb 19, 2013, 9:59 AM
Hi @cleve,

I think it should be allowable, but wrapping an HtmlEditor in a FieldContainer looks excessive (over nesting).

Please clarify do you really need it?

cleve
Feb 19, 2013, 11:33 AM
Hi @cleve,

I think it should be allowable, but wrapping an HtmlEditor in a FieldContainer looks excessive (over nesting).

Please clarify do you really need it?


Not really. I've tried border layout to make HtmlEditor occupy the whole center area, works fine. What my original thinking is to treat a with-format text input as a field just like the other textfield, numberfield (fieldcontainer can grant a label to the editor). Anyway, if it's not regarded as a bug, just forget it and I'll continue using border instead.

Daniil
Feb 19, 2013, 1:48 PM
Generally, an HtmlEditor is a field. The Labelable and Field mixins are mixed into the HtmlEditor class.
http://docs.sencha.com/ext-js/4-1/#!/api/Ext.form.field.HtmlEditor

So, you can set up the FieldLabel property of the HtmlEditor itself.

cleve
Feb 20, 2013, 4:45 AM
Generally, an HtmlEditor is a field. The Labelable and Field mixins are mixed into the HtmlEditor class.
http://docs.sencha.com/ext-js/4-1/#!/api/Ext.form.field.HtmlEditor

So, you can set up the FieldLabel property of the HtmlEditor itself.

I got it. Thanks.