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

inserting images

3 Answers 135 Views
Editor
This is a migrated thread and some comments may be shown as answers.
mww
Top achievements
Rank 1
mww asked on 01 Oct 2009, 03:34 PM
I want to be able to allow users to insert images into the RADEditor, Ive configured it like this

<telerik:RadEditor ID="RadEditorBiography" Runat="server" Skin="Vista"  
                              ToolsFile="ArtistToolsFile.xml" Width="100%"  
                Height="650px" > 
                <Tools> 
                <telerik:EditorToolGroup Tag="FileManagers"
                    <telerik:EditorTool Name="ImageManager" /> 
                    <telerik:EditorTool Name="FlashManager" /> 
                    <telerik:EditorTool Name="MediaManager" /> 
                    <telerik:EditorTool Name="DocumentManager" /> 
                    <telerik:EditorTool Name="TemplateManager" /> 
                </telerik:EditorToolGroup> 
                 
            </Tools> 
            <ImageManager ViewPaths="~/Uploads" /> 
            <FlashManager ViewPaths="~/Uploads/EditorFiles" /> 
            <MediaManager ViewPaths="~/Uploads/EditorFiles"/> 
            <DocumentManager ViewPaths="~/Uploads/EditorFiles" /> 
            <TemplateManager ViewPaths="~/Uploads/EditorFiles" /> 
            <content></content></telerik:RadEditor> 

at runtime, the toolbar has an image manager button, clicking this bring up a the image manager window.  I can then navigate to subdirectories, select an image and insert it.  This works fine, but what if I want to upload an image ??  there is an upload button, but it does nothing.  How would I allow users to upload images to the specified folder, then select the uploaded image for inclusuin into the radeditor window ??


3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 06 Oct 2009, 12:20 PM
Hi,

To enable the Image upload you should also set the UploadPaths property e.g.

 <radE:RadEditor id="RadEditor1" Editable="true" Runat="server" 
    ImagesPaths="~/Editor/Img/UserDir/Marketing,~/Editor/Img/UserDir/PublicRelations"
    UploadImagesPaths="
~/Editor/Img/UserDir/Marketing,~/Editor/Img/UserDir/PublicRelations"
    DeleteImagesPaths
="~/Editor/Img/UserDir/Marketing,~/Editor/Img/UserDir/PublicRelations"
 ></radE:RadEditor>

You can find more information in this KB article: Uploading images to the server (upload tab is disabled).

Best regards,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
mww
Top achievements
Rank 1
answered on 28 Oct 2009, 05:36 PM
Im still experiencing problems trying to upload images from within a RADEditor.  I get this error

Server Error in '/' Application.

The resource cannot be found.

Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.

Requested URL: /office/Telerik.Web.UI.DialogHandler.aspx

The form with the editor on is in a directory underneath my main website (Office) and Telerik.Web.UI.dll is in the bin directory of the website
I have the same configuration in my development environment and everything woprks, its not working in the hosted environment

Heres how my editor is configured

<

 

telerik:RadEditor runat="server" ID="RadEditor1" Height="600px" SkinID="DefaultSetOfTools" Skin="Vista" Width="1050px" Language="en-GB" ToolsFile="ArtistToolsFile.xml">

 

 

<Tools>

 

 

<telerik:EditorToolGroup Tag="FileManagers">

 

 

<telerik:EditorTool Name="ImageManager" />

 

 

<telerik:EditorTool Name="FlashManager" />

 

 

<telerik:EditorTool Name="MediaManager" />

 

 

<telerik:EditorTool Name="DocumentManager" />

 

 

<telerik:EditorTool Name="TemplateManager" />

 

 

</telerik:EditorToolGroup>

 

 

<telerik:EditorToolGroup>

 

 

<telerik:EditorTool Name="Bold" />

 

 

<telerik:EditorTool Name="Italic" />

 

 

<telerik:EditorTool Name="Underline" />

 

 

<telerik:EditorSeparator />

 

 

<telerik:EditorTool Name="ForeColor" />

 

 

<telerik:EditorTool Name="BackColor" />

 

 

<telerik:EditorSeparator />

 

 

<telerik:EditorTool Name="FontName" />

 

 

<telerik:EditorTool Name="RealFontSize" />

 

 

</telerik:EditorToolGroup>

 

 

</Tools>

 

 

<ImageManager

 

 

ViewPaths="~/Uploads"

 

 

DeletePaths="~/Uploads"

 

 

UploadPaths="~/Uploads" />

 

 

 

<Content>

 

 

 

</Content>

 

 

</telerik:RadEditor>

 

0
Rumen
Telerik team
answered on 02 Nov 2009, 02:52 PM
Hi,

Could you please, set the editor's DialogHandlerUrl property to "~/Telerik.Web.UI.DialogHandler.aspx" and test again the dialogs, e.g.

<telerik:RadEditor ID="RadEditor1" DialogHandlerUrl="~/Telerik.Web.UI.DialogHandler.aspx" runat="server"></telerik:RadEditor>

Please, also check this articles and forum thread:

http://www.telerik.com/community/forums/aspnet-ajax/editor/dynamic-data-dialog-error.aspx

http://www.telerik.com/community/forums/aspnet-ajax/general-discussions/another-solution-to-dialogs-returning-404-errors.aspx

http://www.telerik.com/support/kb/aspnet-ajax/editor/error-web-config-registration-missing-the-telerik-dialogs-require-a-httphandler-registration-in-the-web-config-file.aspx

and

http://www.telerik.com/help/aspnet-ajax/registering_the_httphandlers_on_windows_vista_iis_7_integrated_mode.html

All the best,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Editor
Asked by
mww
Top achievements
Rank 1
Answers by
Rumen
Telerik team
mww
Top achievements
Rank 1
Share this question
or