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

Default Message in RadHtmlField

1 Answer 57 Views
WebParts for SharePoint
This is a migrated thread and some comments may be shown as answers.
Ajay
Top achievements
Rank 1
Ajay asked on 17 Feb 2012, 09:47 AM
Hi,

I am using Telric control 5.8 in sharepoint 2007.i want default message using "RadHtmlField" in content area.

please do the needful.

Regards
Ajay

1 Answer, 1 is accepted

Sort by
0
Stanimir
Telerik team
answered on 20 Feb 2012, 09:00 AM
Hello,

You can achieve the desired functionality on the client side.
1. Add the following element in the ConfigFile.xml, which is located in the /Program Files/Common Files/Microsoft Shared/web server extensions/wpresources/RadEditorSharePoint/5.x.x.0__1f131a624888eeed/Resources/ folder:
<property name="OnClientLoad">OnClientLoad</property>

2. Add the following javascript code in the MOSSEditorTools.js, which is located in the mentioned above folder:
function OnClientLoad(editor, args)
{
    var html = editor.get_html(true);
    if (html.match(/^\s*$/) != null)
        editor.set_html("Default content");
}


Greetings,
Stanimir
the Telerik team
Learn how the Telerik controls can be integrated in SharePoint 2007/2010 from this resource. To watch them in action, explore our online SharePoint 2010 and SharePoint 2007 demo sites.
Tags
WebParts for SharePoint
Asked by
Ajay
Top achievements
Rank 1
Answers by
Stanimir
Telerik team
Share this question
or