|
Article relates to
|
RadEditor for MOSS 5+
RadEditor for SharePoint 2010
|
|
Created by
|
Georgi Popivanov
|
|
Last modified
|
9/11/2011
|
|
Last modified by
|
Rumen Zhekov
|
HOW-TO
Execute custom code on the desired editor's event.
SOLUTION for RadEditor for MOSS
In some scenarios it is useful to write custom functionality to be executed on the desired editor's event. The code below demonstrates how to check whether the inserted image through the Image manager has an "
alt" attribute set and if it doesn't then urge the user to enter an "
alt" attribute name:
- Open the wpresources\RadEditorSharePoint\5.x.x.x__1f131a624888eeed\Resources\ MOSSEditorTools.js and write your custom code to be executed on the desired event:
- Open the respective ConfigFile (ConfigFile.xml or ListConfigFile.xml) and set your custom function to be executed on the desired event e.g.
<property name="OnClientPasteHtml">OnClientPasteHtml</property>
- Save the files, clear the browser's cache and review the result.
SOLUTION for RadEditor for SharePoint 2010
The code below demonstrates how
to check whether the inserted image through the Image manager has an "
alt" attribute set and if it doesn't then urge the user to enter an "
alt" attribute name:
- Open the \Program Files\Common Files\Microsoft Shared\Web Server Extensions\wpresources\RadEditorSharePoint\6.x.x.x__1f131a624888eeed\Resources\SPEditorTools.js file and write at the end of the file your custom code to be executed on the desired event:
- Open the respective ConfigFile (ConfigFile.xml or ListConfigFile.xml) and set your custom function to be executed on the desired event e.g.
<property name="OnClientPasteHtml">OnClientPasteHtml</property>
- Save the files, clear the browser's cache and review the result.
For more information about the different editor's events please review the following help articles:
Please
Sign In
to rate this article.