PDA

View Full Version : Problem with HTMLeditor width



haltenberg
Jun 09, 2008, 2:21 PM
I am using coolite 0.5.0 and cannot make width of HTMLeditor to be 100% :(
Attempts to put the editor into FitLayout do not help. If I don't specify the width of control in pixels and use AutoWidth, the resulting IFRAME element is 300px. Is there any way to make it 100%? Also, even though I specify the height of the control, it seems to always be 293px :(

Also, the functionality I am trying to achieve right now is just the ability to view html document (a string returned by the object that is a complete html document with its own styles, etc) in my webform. I.e. I do not need any editing capabilities. I've managed to successfully turn off toolbar elements, set up the ReadOnly property to true, but when the control is clicked, I can edit the document in IFRAME. Is it possible to somehow make it truly readonly?

Many thanks!

geoffrey.mcgill
Jun 10, 2008, 4:53 AM
Hi haltenberg,

Making the inner control stretch 100% height/width required a hack with the current code base (0.5.1 or earlier), but I added functionality to the Layout controls, so now they accept any ext:Component, instead of just ext:PanelBase Controls.

The following two samples demonstrate the new functionality of FitLayout and AnchorLayout.

http://sandbox.ext.net/Form/HtmlEditor/WindowWithFitLayout.aspx

http://sandbox.ext.net/Form/HtmlEditor/WindowWithAnchorLayout.aspx

The new functionality demonstrated above will be included with the 0.5.2 maintenance release, probably late this week.

I did some research into the ReadOnly/Disabled functionality of the HtmlEditor and at the moment I do not have a solution to truely make the HtmlEditor ReadOnly or Disabled. This appears to be a missing feature (some say bug ;)) of the HtmlEditor. There's some new work going on with the HtmlEditor right now, in preparation for the Ext v2.2 release, so I'm going to see about getting this functionality included.

Hope this helps.

haltenberg
Jun 10, 2008, 1:22 PM
Geoffrey,

Doodles are very cool! I wish the Coolite site had many of those. :-)

I have copy-pasted the source code of the FitLayout demo and it throws an exception:

Coolite.Ext.Web.ItemsCollection`1[[Coolite.Ext.Web.PanelBase, Coolite.Ext.Web, Version=0.5.1.3571, Culture=neutral, PublicKeyToken=f58c952e9aa5b80a]] must have items of type 'Coolite.Ext.Web.PanelBase'. 'ext:HtmlEditor' is of type 'Coolite.Ext.Web.HtmlEditor'.

geoffrey.mcgill
Jun 10, 2008, 2:31 PM
geoffrey.mcgill (6/10/2008)Hi haltenberg,


The new functionality demonstrated above will be included with the 0.5.2 maintenance release, probably late this week.

Pete
Aug 17, 2011, 4:37 PM
Hi,

I'm having the same problem with the fixed width (300px) of an iframe within an ext:HtmlEditor under Ext.Net 1.0. Unfortunately the linked sandbox.ext.net examples above won't load (looks like sandbox.ext.net is dead?). Is there a mirror of them available anywhere?

The code I'm debugging currently looks like this:



<ext:Panel ID="InstructionsTab" runat="server" Title="Instructions" Height="800" BodyStyle="padding:10px 10px 10px;" LabelWidth="150">
<Content>
<ext:AnchorLayout runat="server">
<Anchors>
<ext:Anchor>
<ext:HtmlEditor ID="InstructionText" runat="server" Cls="txtComments" AutoWidth="true"
Height="200" EnableAlignments="true" EnableFont="true" EnableColors="true" EnableFormat="true"
EnableLists="true" FieldLabel="Instructions To Students" >
</ext:HtmlEditor>
</ext:Anchor>
<ext:Anchor>
<ext:HtmlEditor ID="MarkersInstructionText" runat="server" Cls="txtComments" AutoWidth="true"
Height="200" EnableAlignments="true" EnableFont="true" EnableColors="true" EnableFormat="true"
EnableLists="true" FieldLabel="Instructions To Markers" >
</ext:HtmlEditor>
</ext:Anchor>
</Anchors>
</ext:AnchorLayout>
</Content>
</ext:Panel>


Cheers!

Pete