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

How to prevent wrappping in rad editor?

1 Answer 144 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Nilanjan
Top achievements
Rank 1
Nilanjan asked on 22 Sep 2008, 01:53 PM
I have a rad editor of certain width and height. When i keep on typing characters, the words get wrapped to the next line after reaching the end of the content area.   However i would like the words not to wrap and continue in a single line till i manually press enter. A scrollbar needs to appear at the bottom for horizontally scrolling the content.  How can i achieve this with rad editor?

I want to display the content as it is,  in another screen in perfectly the same way it looked when it was being edited including line breaks and non wrappings,etc.

Pls this is urgent.

Nilanjan.

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 23 Sep 2008, 09:46 AM
Hello Nilanjan,

In order to achieve your scenario, you should set the CssFiles property to point to an external css file and in it to set a global body tag with word-wrap: normal;, e.g.

        <telerik:RadEditor ID="RadEditor1" runat="server">
            <Content>
            </Content>
            <CssFiles>
                <telerik:EditorCssFile Value="~/EditorContentArea.css" />
            </CssFiles>
        </telerik:RadEditor>


EditorContentArea.css:

body
{
    word-wrap: normal;
    color: black;
    background-color: white;
    padding:3px;
    background-image: none;
    margin: 0px;
    text-align: left;
}

Thus when typing the long word will be not wrapped to the next line when it exceeds the horizontal boundary of the editor.

Best regards,
Rumen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Editor
Asked by
Nilanjan
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or