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

[Solved] Set Rad Editor width through css

7 Answers 228 Views
Editor
This is a migrated thread and some comments may be shown as answers.
sinu
Top achievements
Rank 1
sinu asked on 16 May 2008, 06:37 PM
How do I set the width of the Editor through a CSS class. No matter what the width of the Editor is always 640px.
Thanks

7 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 17 May 2008, 08:08 AM
Hi Sinu,

RadEditor is a composite control and it is not possible to set its size entirely using css styles.
If you want to set its width you can use the editor's Width server property or the setSize(width, height) client-side method.

Best regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
A
Top achievements
Rank 1
answered on 02 Jun 2008, 02:40 PM
Hi,
How do I set it's top and left style properties on the client if I am positioning it with ABSOLUTE positioning?

Thanks, AL
0
Rumen
Telerik team
answered on 02 Jun 2008, 02:59 PM
Hi AL,

Here is the requested example:

<asp:ScriptManager ID="ScriptManager1" runat="server" ></asp:ScriptManager>
<script type="text/javascript">
function OnClientLoad(editor, args)
{
    var wrapper = document.getElementById("RadEditor1");
    if (wrapper.className.indexOf("rade_wrapper") >-1)
    {
        wrapper = wrapper.style;
        wrapper.position = "absolute";
        wrapper.top = "300px";
        wrapper.left = "300px";
    }
}
</script>
<telerik:radeditor runat="server" ID="RadEditor1" OnClientLoad="OnClientLoad">
</telerik:radeditor>

Kind regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
A
Top achievements
Rank 1
answered on 05 Jun 2008, 02:56 AM
Hi Rumen,
     Your sample code below works but with my toolbar menu in "showonfocus" mode when I move the RadEditor the toolbar remains in the original location and only by moving focus off and then back onto the RadEditor is is repositioned correctly. Is there an API I can call to "refresh" the toolbar menu position?

Thanks, Andy
0
Rumen
Telerik team
answered on 05 Jun 2008, 11:17 AM
Hi Andy,

I tried to reproduce the problem with the latest version of Telerik.Web.UI.dll, but unfortunately to no avail. You can see my test in the attached video as well as test the included sample project. Am I missing something?

Could you please, modify the project and send it back to us with reproduction steps so that we can reproduce the problem on our side and provide a solution?

Regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
A
Top achievements
Rank 1
answered on 05 Jun 2008, 03:59 PM
Hi Rumen, 
        In my scenario I have implemented a custom toolbar button which does the resize of the RadEditor (my own fullscreenmode type function).

You sample works because the toolbar menu is hidden because the RadEditor losses focus as you click the ASP Button which performs the resize javascript.

Thanks, Andy
0
Rumen
Telerik team
answered on 10 Jun 2008, 08:57 AM
Hi Andy,

Is it possible to share your code with us? If you want you can open a support ticket and send a sample running project that demonstrates the problem. I will examine it and see what is causing this problem.

After that I will try to provide a solution.

Thank you for your assistance.


Best regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Editor
Asked by
sinu
Top achievements
Rank 1
Answers by
Rumen
Telerik team
A
Top achievements
Rank 1
Share this question
or