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

STOP SPRadeditor refreshing on specific button click event

1 Answer 31 Views
Sharepoint Integration
This is a migrated thread and some comments may be shown as answers.
NLB
Top achievements
Rank 1
NLB asked on 27 May 2013, 08:02 AM
I have a upload button on the custom webpart designed and used in SharePoint 2010. On the Click event of the upload button the content in the SpRadeditor reloads, which hangs the pages for a while and then reloads the content leading to slowness of the process.

This works fine, if the content of the SPRadEditor is small.

How can i stop the rad editor from reacting to the Click event of the particular button?

I referred the below specified forum and tried to apply the javascript as specified in the forum but it didn't help. Could you please help on the same?

http://www.telerik.com/community/forums/aspnet-ajax/editor/stop-rad-editor-refreshing-on-timer-tick-event.aspx

<script type="text/javascript">

function AvoidTelerikRefresh() {

 

var originalSaveContent = Telerik.Web.UI.RadEditor.prototype.saveContent;

 

Telerik.Web.UI.RadEditor.prototype.saveContent = function () {  };

 

}

</script>

<asp:Button runat="server" ID="btnUpload" Text="Upload" CssClass="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"

OnClick="btnUpload_Click" OnClientClick="AvoidTelerikRefresh();" />


1 Answer, 1 is accepted

Sort by
0
Stanimir
Telerik team
answered on 29 May 2013, 01:28 PM
Hello,

Check the following online demo: http://demos.telerik.com/aspnet-ajax/editor/examples/workingwithlargecontent/defaultcs.aspx. You can find in it some settings suggestions of how to configure the editor so the work with large content is improved by sacrificing some control's functionality.

Check the following online help articles to understand how RadEditor for SharePoint is configured:
Set Properties Via Config File
Add/Remove tools from the toolbar

Also you want to add some javascript code regarding the editor, the best place is the SPEditorTools.js file, which is located in the C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\wpresources\RadEditorSharePoint\6.x.x.x__1f131a624888eeed\Resources folder. However keep in mind that you need to backup your customizations on the event of RadEditor for SharePoint uninstall.


Regards,
Stanimir
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Sharepoint Integration
Asked by
NLB
Top achievements
Rank 1
Answers by
Stanimir
Telerik team
Share this question
or