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

Setting editors size on client-side issue

1 Answer 64 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Vitalii
Top achievements
Rank 1
Vitalii asked on 14 Feb 2013, 04:28 PM
Hello Telerik, have some problems)

So, I have my Editor:
                                       
<telerik:RadEditor Visible="false" Height="300px" CssClass="Editor" ID="reHelpBody" runat="server"<br>
EditModes="Design" ToolbarMode="Default"><br>
<Content><br>
</Content><br>
<ImageManager ViewPaths="~/Content/images/Help/" UploadPaths="~/Content/images/Help/"<br>
DeletePaths="~/Content/images/Help/" MaxUploadFileSize="204800" /><br>
<Tools><br>
<telerik:EditorToolGroup><br>
<telerik:EditorTool Name="Bold" /><br>
<telerik:EditorTool Name="Italic" /><br>
<telerik:EditorTool Name="Underline" /><br>
<telerik:EditorTool Name="ImageManager" /><br>
</telerik:EditorToolGroup><br>
</Tools><br>
</telerik:RadEditor>


And CSS that I have now:

.Default.RadEditor .reContentCell {<br>
    border: 1px solid #D6D6D6 !important;<br>
}<br>
.Default.RadEditor {<br>
    background-color: #F3F3F3 !important;<br>
}<br>
.RadEditor table {<br>
    position: relative;<br>
}<br>
.RadEditor .reToolZone table {<br>
    position: absolute;<br>
    right: 0;<br>
    top: 0;<br>
    width: 180px !important;<br>
}


That is all for CSS)
So I want to dynamically change size of editor.

I was trying next scripts:

       
function pageLoad() {<br>
            var editor = $find("<%=reHelpBody.ClientID%>");<br>
            editor.get_element().setSize("80","60");<br>
        }<br>
<br>
        function pageLoad() {<br>
            var editor = $find("<%=reHelpBody.ClientID%>");<br>
            editor.setSize("80","60");<br>
        }<br>
<br>
        function pageLoad() {<br>
            var editor = $find("<%=reHelpBody.ClientID%>");<br>
            editor.get_element().setSize("80","60");<br>
    editor.get_element().style.height = "490px";
    editor.style.height = "490px;
        }



But still I have in Chrome next thing:
element.style {
  1. width680px;
  2. height300px;
  3. min-height300px;
  4. min-width680px;
}

I tried to append CSS:

       
.Default.RadEditor
        {
            float: right;
            width: 300px;
            min-width: 100px;
        }

but got nothing. For float it works fine. What else can I do?)

P.S. It's just impossibru to deal with your code block.

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 19 Feb 2013, 09:43 AM
Hello,

The editor.get_element() method returns a reference to RadEditor's <div> wrapper. This <div> HTML element does not have a setSize method.

The setSize method is a method of the editor's client object.

Please, correct your code and if you still experience any problems, provide a simple working project and screenshots and instructions how to reproduce them.

Kind regards,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Editor
Asked by
Vitalii
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or