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

Get image of content written in Rad Editor Programatically

1 Answer 26 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Adeel
Top achievements
Rank 1
Adeel asked on 22 Jan 2015, 10:30 AM
I am using q3 2014 release and i have used a rad editor in it .
when i write a long line in rad editor it automaticlly shows me this line as

"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"

beacause i have fixed the size of editor.but when i get its html it gives me the same line as :

"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"

i want the html content to be same as shown in the editor but i dont want to make any changes in editor size.

Secondly,
Is there any way to get an image of the content that i am able to see in rad editor content area only???????

1 Answer, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 24 Jan 2015, 01:46 PM
Hello Adeel,

The RadEditor control is designed to act as a normal text editor and restrict content into its size dimensions. Like in desktop text editors, if you have a long paragraph text, it will fall to new lines. Opened in a larger document, the same paragraph will appear with less lines of text. This is an expected behaviro for the text editors.

However, you can apply a custom style to handle that:

ASP.NET
<telerik:RadEditor runat="server" ID="RadEditor1">
    <CssFiles>
        <telerik:EditorCssFile Value="ContentStyles.css" />
    </CssFiles>
</telerik:RadEditor>

ContentStyles.css
body {
    word-wrap:normal !important;
}


As for the image, the RadEditor does not provide such functionality. Although, you can generate image data from HTML with canvas element. You can read more about it in Drawing DOM objects into a canvas

Regards,
Ianko
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Editor
Asked by
Adeel
Top achievements
Rank 1
Answers by
Ianko
Telerik team
Share this question
or