EditMode HTML

4 posts, 0 answers
  1. Lenny_shp
    Lenny_shp avatar
    343 posts
    Member since:
    Jul 2006

    Posted 01 Mar 2011 Link to this post

    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>
  2. Rumen
    Admin
    Rumen avatar
    14075 posts

    Posted 02 Mar 2011 Link to this post

    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!
  3. Lenny_shp
    Lenny_shp avatar
    343 posts
    Member since:
    Jul 2006

    Posted 02 Mar 2011 Link to this post

    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?
  4. Rumen
    Admin
    Rumen avatar
    14075 posts

    Posted 07 Mar 2011 Link to this post

    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!
Back to Top