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

Setting RadEditor Content Area Size (the user-editable area)

3 Answers 482 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Bill Jindrich
Top achievements
Rank 1
Bill Jindrich asked on 22 Feb 2017, 12:19 AM

I see that the height and width of RadEditor can be set in the host ASPX file, but these dimensions apply to the entire control (toolbar and other chrome).  I need to set the height and width of the content editing area (i.e. the area that the user edits content in. My use case is that some of my customers need to build HTML that will be placed in a region with a defined height and width on an HTML page (I don't know if it's a DIV or an IFrame or something else, I'm looking into that). I need the RadEditor to provide WYSIWYG for how the HTML content will flow/fit in that region of specified size.

1) Is there a way to set the width and height of RadEditor's content area?

2) Is there a way to prevent the RadEditor control from being resized?

Thanks in advance!

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 22 Feb 2017, 04:22 PM

Hello Bill,

You can see how to get a reference to the content area in this forum thread: http://www.telerik.com/forums/radeditor-contentarea-height

If the ContentAreaMode property is set to Iframe and the AutoResizeHeight to false, the content area won't be resizable.

Regards,
Rumen
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Bill Jindrich
Top achievements
Rank 1
answered on 04 Mar 2017, 12:07 AM
This does not address my question. When I noted that I need to set the size of "the area that the user edits content in" - I need to set the size of the rectangle that the user can type in. The referenced article shows how to set the size of the entire editor control, inlcuding toolbars, etc. How can I set the width and height of the editing area?
0
Rumen
Telerik team
answered on 06 Mar 2017, 07:34 AM

Hi,

You can get reference to the content area using the following line of code:

var content area = editor.get_contentArea();

and apply a new height using 

editor.get_contentArea().style.height = "200px";

This article shows how to get reference to RadEditor on the client - http://docs.telerik.com/devtools/aspnet-ajax/controls/editor/client-side-programming/getting-a-reference-to-radeditor

Best regards,

Rumen

Telerik by Progress

Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Editor
Asked by
Bill Jindrich
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Bill Jindrich
Top achievements
Rank 1
Share this question
or