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

RadHtmlField formatting problem

1 Answer 83 Views
WebParts for SharePoint
This is a migrated thread and some comments may be shown as answers.
David Morgan
Top achievements
Rank 1
David Morgan asked on 14 Apr 2008, 04:42 PM
I want to be able to restrict the fonts and font sizes available to someone using the radhtmlfield in MOSS. i can configure the menus to only show Arial and 10,12 and 14pt but i cannot prevent someone from pasting formatted text from Word into the radhtmlfield control... can anyone explain how this can be done?

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 14 Apr 2008, 05:09 PM
Hi David,

You can now enforce content formatting using the StripFormattingOnPaste property. As a result, format stripping will be applied to all content that users are trying to paste.

The EditorStripFormattingOptions enumerator can have any or a combination of the following values:

  • None - pastes the clipboard content as is
  • MSWord - strips Word-specific tags on Paste, preserving fonts and text sizes
  • MSWordNoFonts - strips Word-specific tags on Paste, preserving text sizes only
  • MSWordRemoveAll - strips Word-specific tag on Paste, removing both fonts and text sizes
  • Css - strips CSS styles on Paste
  • Font - strips Font tags on Paste
  • Span - strips Span tags on Paste
  • All - strips all HTML formatting and pastes plain text
  • NoneSupressCleanMessage - Doesn't strip anything on paste and does not ask questions.
You can set this property in the

\\mossrtm\C$\Program Files\Common Files\Microsoft Shared\web server extensions\wpresources\RadEditorSharePoint\4.5.3.0__1f131a624888eeed\RadControls\Editor\ConfigFile.xml file and ListConfigFile for list scenarios, e.g.

  <property name="StripFormattingOnPaste">MSWordRemoveAll,Span,Font</property>



Best regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
WebParts for SharePoint
Asked by
David Morgan
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or