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

Setting Default Html Content in RadHtmlField

5 Answers 74 Views
WebParts for SharePoint
This is a migrated thread and some comments may be shown as answers.
Amal Abeygunawardana
Top achievements
Rank 1
Amal Abeygunawardana asked on 25 Jun 2010, 02:34 AM
Hi Everyone,

I tried setting "Html" attribute of "RadHtmlField" to set some default html content when the page layout loads in SharePoint. However, this default value was not set as expected. Following is the code from page layout,

<telerik:RadHtmlField id="myfieldid" FieldName="myfieldid" runat="server" Html="&lt;h1&gt;my default content &lt;/h1&gt;" >
 </telerik:RadHtmlField>

Any help to set default content for this field is very much appreciated.

Thanks & Regards,
Amal

5 Answers, 1 is accepted

Sort by
0
Stanimir
Telerik team
answered on 25 Jun 2010, 07:33 AM
Hi Amal,

Could you confirm, which version of RadEditor for MOSS are you using? Knowing this I will be able to give a corresponding sample solution for the problem.


All the best,
Stanimir
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Ajay
Top achievements
Rank 1
answered on 17 Feb 2012, 09:39 AM
Hi,

I am using 5.8 RadEditor for MOSS .i not able to set Default Message in RadHtmlField
Please do the needful ASPA

Regards
Ajay
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.
0
Vishal
Top achievements
Rank 1
answered on 21 Feb 2012, 12:21 PM
We have two more queries regarding your response:
1. On the path mentioned for "ConfigFile.xml" there are 8-10 more files with following naming convention:
    ConfigFile{GUID1}.xml
ConfigFile{GUID1}.xml
ConfigFile{GUID2}.xml
ConfigFile{GUID3}.xml
ConfigFile{GUID4}.xml
ConfigFile{GUID5}.xml
ConfigFile{GUID6}.xml
ConfigFile{GUID7}.xml
All the GUID values are different. From where does it get the GUID's?
Which "ConfigFile.xml"  should we change?

2. There is one "ConfigFile.xml" and "MOSSEditorTools.js" in "RadEditorMOSS.wsp" which we used to deploy RADEditor. Is it fine if we extract all the files from the wsp, make changes to "ConfigFile.xml" and "MOSSEditorTools.js" and create another .wsp using "makecab" utility? Any piece of advice you would like to suggest?

Rgds,
Vishal
0
Stanimir
Telerik team
answered on 23 Feb 2012, 09:53 AM
Hello,

1. Regarding the first question review the following online help article: Different configuration files for different webs

2. There is one "ConfigFile.xml" and "MOSSEditorTools.js" in "RadEditorMOSS.wsp" which we used to deploy RADEditor. Is it fine if we extract all the files from the wsp, make changes to "ConfigFile.xml" and "MOSSEditorTools.js" and create another .wsp using "makecab" utility? Any piece of advice you would like to suggest? -  In order to achieve this you will need some additional files, which we provide on demand. In order to get them open an official support ticket and, if you have valid license credentials I will provide them to you.


All the best,
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
Amal Abeygunawardana
Top achievements
Rank 1
Answers by
Stanimir
Telerik team
Ajay
Top achievements
Rank 1
Vishal
Top achievements
Rank 1
Share this question
or