Preventing copy-paste all the rich text editor in SharePoint
As part of an accessible Web sites in SharePoint, this time I will present the code prevents the copy-paste.
The following code prevents copy-paste content editor rich text field
Your... Roi
The following code prevents copy-paste content editor rich text field
/* ECM */
function disablePasteForRTE() {
Type.registerNamespace("RTE");
if (RTE)
{
if (RTE.RichTextEditor != null)
{
RTE.RichTextEditor.paste = function () {
RTE.Cursor.paste(true);
}
RTE.Cursor.$3C_0 = true;
}
}
}
if (_spBodyOnLoadFunctionNames != null) {
_spBodyOnLoadFunctionNames.push('disablePasteForRTE');
}
/* End ECM *
Your... Roi
Comments
Post a Comment