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

Upload and Place images

3 Answers 146 Views
Editor
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 17 Jul 2008, 08:30 PM
I need users to be able to place images using the editor.  I of course do not want them going into and seeing files on the server, but I would like them simply to be able to upload am image and then place it wherever they want in the document they are creating.  Vbulletin editor has a way to do this, I need this functionality on my DNN site for both the forums and articles.  Is there a way to do this with r.a.d.

Any help is greatly appreciated, Thanks.

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 18 Jul 2008, 11:31 AM
Hi David,

You can use the Image manager of RadEditor to upload and inserts image files in the content.

RadHtmlEditorProvider does not have a separate property to specify where content could be uploaded. It uses the DotNetNuke core functions to verify whether a user has write permissions to a specific folder. So in effect you only need to include an "ImagesPaths" property. The provider will decide to which paths from the list the user can upload.
The other difference from a normal editor is the "*PortalRoot*" path. It specifies the root folder of the portal, from which the editor is opened.

DotNetNuke keeps the folder and file structure of a portal in its database. When you manually copy content to your portal folder, the database and the folder get out of sync. Normally after you change the folder structure of your portal, you should go to Admin>File Manager and click the Synchronize Database And File System link. This will insert information about the new folders in the database and ensure that RadEditor will be working correctly. An exception "Directory already exists." will be thrown if you try to use the editor when the database and file system are not synchronized.

Example:

If you set ImagesPaths="images, *PortalRoot*", the user will be able to select images from "DotNetNuke/Portals/0/" and "DotNetNuke/Portals/0/images/", where "DotNetNuke" is the root folder of your DotNetNuke project.

Here is an example configuration of RadEditor in the web.config file of the DotNetNuke project:
...
< htmlEditor defaultProvider ="RadHtmlEditorProvider">
  < providers >
   <
clear />
<
add name ="RadHtmlEditorProvider"
type ="Telerik.DNN.Providers.RadHtmlEditorProvider, Telerik.DNN.Providers.RadHtmlEditorProvider"
providerPath ="~\Providers\HtmlEditorProviders\RadHtmlEditorProvider\"
AutoCreatePaths ="true"
ImagesPaths ="*PortalRoot*" />


Best regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
David
Top achievements
Rank 1
answered on 22 Jul 2008, 08:47 AM
Thanks for the INfo

In the end looks like I accomplished what I needed by setting
AutoCreatePaths and EnableUploadUserFolders in the WebConfig.

Then I figured it would be more manageable if I used the Config.XML file.

Any docs on what settings are available from where which work in web.Config and which in Config.xml they only thing I could find to date is 
http://dnn.telerik.com/Support/radEditorHtmlproviderOverview/tabid/50/Default.aspx
And though this lists many valid settings it seems that there are may be invalid as well that no longer work in the flash version since this is for the old version. Obviously reading through the Code is one option.

So far The List I have is as follows (for anyone else that stumbles on this thread).

From Web.Config
EnableUpload
EnableUploadUserFolders
AutoCreatePaths
CssClasses
LinksUseTabNames
LinksUseTabNames
SyncDBOnSubmit
ConfigUsesPageID
CssFiles
ImagesPaths
FlashPaths
DocumentsPaths
MediaPaths
TemplatePaths
ConfigFile
ToolsFile
ToolsFileGuest
ToolsFileRegistered
ToolsFileAdmin
ToolsFileHost

ToolsFile.Xml
CssFiles
Colors
Symbols
Links
FontNames
FontSizes
Paragraphs
RealFontSizes
CssClasses
Snippets
Languages

Config.Xml
ToolbarMode
EditModes
StripFormattingOptions
ToolsFile
MaxImageSize
MaxFlashSize
MaxMediaSize
MaxDocumentSize
MaxTemplateSize
FileBrowserContentProviderTypeName
SpellAllowAddCustom"

'RadSpell properties
SpellCustomDictionarySourceTypeNameSpellCustomDictionarySuffix
SpellDictionaryPath
SpellDictionaryLanguage
SpellEditDistance
SpellFragmentIgnoreOptions
SpellCheckProvider
SpellWordIgnoreOptions
' end of RadSpell properties

ImagesPaths
ImagesFilters
FlashPaths
FlashFilters
MediaPaths
MediaFilters
DocumentsPaths
DocumentsFilters
TemplatePaths
TemplateFilters

0
Lini
Telerik team
answered on 23 Jul 2008, 02:43 PM
Hello David,

Thank you for the provided information! The documentation you are referring to is for the old RadEditor provider for DNN (using the classic ASP.NET version of the editor). The documentation for the new provider (based on the ASP.NET AJAX RadEditor) is available online at http://www.telerik.com/help/aspnet-ajax/dnn-radeditor-provider.html. We will update it soon with an article about what properties are available from the ConfigFile.xml and the provider definition in the Web.config file.

Regards,
Lini
the Telerik team

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