Modify RadEditor for sharepoint Max file size allowed 200KB to more Size

if some need to modify Max file size

it's possible by setting the MaxImageSize property in the Configuration file(

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\wpresources\RadEditorSharePoint\4.5.6.0__1f131a624888eeed\RadControls\Editor\ConfigFile.xml

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\wpresources\RadEditorSharePoint\4.5.6.0__1f131a624888eeed\RadControls\Editor\ListConfigFile.xml

).

There you can also set the allowed document's extensions

<property name="MaxImageSize">204800</property> 

<property name="DocumentsFilters"> 
<item>*.doc</item> 
<item>*.pdf</item> 
</property>
<property name="MaxImageSize">204800</property>      
<property name="MaxFlashSize">102400</property>      
<property name="MaxMediaSize">5242880</property>     
<property name="MaxDocumentSize">512000</property>       
<property name="MaxTemplateSize">204800</property>

The MaxImageSize property is in bytes and its default value is 204800 (200KB). You can set it to anything you like as long as it's not over the MaxRequestLength value set in the MOSS web.config file (51 MB). For example, if you want to upload 10 MB images, set MaxImageSize to 10485760.

As for the metadata, I can confirm that the upload function in the built-in editor dialog does not allow you to set any additional information for the file. You can do this only if you open the file from the image library.

Using The ConfigFile.xml Send comments on this topic.
 

Telerik RadEditor can use ConfigFiles. These are XML files, which contain the whole configuration of the component. They can be shared among multiple editors and thus make group re-configuration extremely easy. In case you want to manage a number of identical editors at once you can just set them to use one ConfigFile and modify only that file when needed.

Moreover, you can still tweak individual editors by setting certain properties directly in the Telerik RadEditor tag, as those will override the properties defined in the ConfigFile.

IMPORTANT: The ConfigFile property does not have a default value set. This means that you must point the ConfigFile property to the configuration file that you intend to use. For example if you want to use the default configuration file that comes with the Telerik RadEditor's distribution, you must set ConfigFile="~/RadControls/Editor/ConfigFile.xml"



Below is an example of a simple ConfigFile:

ConfigFile.xml
<configuration>
     
<property name="ToolbarMode">Default</property>
     
<property name="UseClassicDialogs"> false</property>
     
<property name="NewLineBr"> true</property>
     
<property name="ToolsFile">~/RadControls/Editor/ToolsFile.xml</property>
     
<property name="Skin">Default</property>
     
<property name="SaveAsXhtml">false</property>
     
<property name="AllowThumbGeneration"> true</property>
     
<property name="ImagesPaths">
        
<item> ~/Img/</item>
     
</property>
     
<property name="UploadImagesPaths">
        
<item> ~/Img/</item>
     
</property>
     
<property name="DeleteImagesPaths">
        
<item> ~/Img/</item>
     
</property>
     
<property name="Language">en-US</property>
</
configuration>

As a result, the <RadEditor> tag can be reduced to the following:

ASPX
<rad:RadEditor id="editor1" runat="server"
  
ConfigFile= "~/RadControls/Editor/ConfigFile.xml">
</
rad:RadEditor>

The "~" tilde symbol represents your web application root directory
 

ConfigFile structure:

The ConfigFile must have a valid structure as shown below.

Note, that all items are case sensitive!
ConfigFile.xml
<configuration>
   
<property>
        
<item>
         
...
        
</item>
        
<item>
         
...
        
</item>
        
...
   
</property>
   
...
</configuration>
 
"property" element valid attributes:
name(required):
ToolbarMode ToolsFile Skin AllowCustomColors SaveAsXhtml Width
Height StripAbsoluteImagesPaths StripAbsoluteAnchorPaths StripFormattingOnPaste AllowThumbGeneration ThumbSuffix
ToolsHeight Html ImagesPathToStrip ImagesPaths DeleteMediaPaths UseClassicDialogs
Editable MaxTemplateSize MaxImageSize MaxFlashSize MaxDocumentSize MaxMediaSize
ShowHtmlMode ShowPreviewMode NewLineBr AllowScripts OnFileUpload OnFileDelete
UploadImagesPaths DeleteImagesPaths FlashPaths UploadFlashPaths DeleteFlashPaths MediaPaths
UploadMediaPaths DocumentsPaths UploadDocumentsPaths DeleteDocumentsPaths DocumentsFilters MediaFilters
EnableHtmlIndentation EnableEnhancedEdit EnableContextMenus UseFixedToolbar ConvertTagsToLower AnchorPathToStrip
TemplatePaths UploadTemplatePaths DeleteTemplatePaths TemplateFilters CookieExpirationTime Language
ImagesFilters  FileEncoding SaveInFile CssFiles CausesValidation HasPermission
LicenseFile ShowSubmitCancelButtons StripFormattingOnPaste SpellWordIgnoreOptions SpellCheckProvider SpellDictionaryLanguage
SpellAllowAddCustom SpellCustomDictionarySourceTypeName SpellCustomDictionarySuffix SpellDictionaryPath SpellEditDistance SpellFragmentIgnoreOptions
AnchorPathToStrip ImagesPathToStrip ConvertFontToSpan ConvertToXhtml ThumbSuffix ToolbarMode
 
"item" element valid attributes:
 (item elements should appear as child elements of a property element with "name" attribute set to:
 "ButtonsStyle", "ImagesPaths", "UploadImagesPaths", "DeleteImagesPaths",
 "FlashPaths", "UploadFlashPaths", "DeleteFlashPaths", "MediaPaths", "UploadMediaPaths",
 "DeleteMediaPaths", "DocumentsPaths", "UploadDocumentsPaths", "DeleteDocumentsPaths",
 "DocumentsFilters", "MediaFilters", "TemplatePaths", "UploadTemplatePaths", "DeleteTemplatePaths",
 "TemplateFilters", "MaxTemplateSize")

  

IMPORTANT: If you are upgrading from a previous version of Telerik RadEditor, make sure that you remove all deprecated properties from the XML ConfigFile, otherwise the application will throw an exception.
原文地址:https://www.cnblogs.com/Areas/p/2744325.html