This is a migrated thread and some comments may be shown as answers.

EditMode HTML

3 Answers 65 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Lenny_shp
Top achievements
Rank 2
Lenny_shp asked on 02 Mar 2011, 04:03 AM
2010.3.1304.20  IE8

In "Design" mode is fine, but in in "HTML" mode something strange goes on with below:
Height of the control not in line with data displayed and scroll bars come up.   Most of the data after first line is hidden.

<telerik:RadEditor ID="txtExplain" AutoResizeHeight="true" BorderStyle="None" BorderWidth="0px" EditModes="HTML"
                    ToolsFile="~/Resources/EmptyTools.xml" Width="720px" Height=”30px” style="height:auto" StripFormattingOptions="All"  runat="server">
</telerik:RadEditor>

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 02 Mar 2011, 10:26 AM
Hi Lenny_shp,

I am unable to reproduce the reported behavior on my end. For your convenience I have attached a video demonstrating my test at http://screencast.com/t/Eoh9o5a8eL and my sample project. Can you please modify the project so that the problem is reproducible and send it for examination?

You can also check the styles on the page with RadEditor, because some of them could cause the height and scrollbar problem.

Best regards,
Rumen
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Lenny_shp
Top achievements
Rank 2
answered on 02 Mar 2011, 05:20 PM
I want to set the editor in "Html" mode but retain the auto height expansion feature that is available in "Design" mode.
In your video you get the scrollbar.    Can the above be added as a feature request for future release?
0
Rumen
Telerik team
answered on 07 Mar 2011, 03:36 PM
Hello Lenny_shp,

Thank you for your feature request.

The implementation of this feature is not easy and will require a lot of coding and testing in order to provide a fully working cross browser solution. That is why I logged your requirement in our PITS system and if anyone else requests it we will consider its implementation.

If this feature is a huge requirement for your project then you can try to implement it yourself using as a base the OnClientModeChange event and editor.get_textArea method which will return a reference to the textarea of RadEditor in HTML mode, e.g.

<telerik:RadEditor ID="RadEditor1" runat="server" OnClientModeChange="OnClientModeChange"></telerik:RadEditor>
<script type="text/javascript">
function OnClientModeChange(editor) {
        if(editor.get_mode() == 2) {
            var textArea = editor.get_textArea();
            alert(textArea.style.height);
        }
    }
</script>

Greetings,
Rumen
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
Editor
Asked by
Lenny_shp
Top achievements
Rank 2
Answers by
Rumen
Telerik team
Lenny_shp
Top achievements
Rank 2
Share this question
or