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

Rad Editor - Image Map Editor Objects

6 Answers 292 Views
Editor
This is a migrated thread and some comments may be shown as answers.
jorex
Top achievements
Rank 1
jorex asked on 18 Mar 2009, 10:43 AM
Hi,

Is there a way or can we utilize the Image Map editor without using the RadEditor? If yes, how can we use it in such we can retrieve and save data such as saving of image and "area properties" in database?


Thank you in advance... hope you can help us with our query..

Regards,

Rex

6 Answers, 1 is accepted

Sort by
0
jorex
Top achievements
Rank 1
answered on 19 Mar 2009, 02:56 AM
alright.. i just found out that i can utilize the RadEditor to save Image and hotspots as html elements... problem is that i just want the whole RadEditor to be like an Image Editor.. like uploading of image and setting of hotspots only...

questions:

- how to set "Insert Image", "Image Properties" and "Image Map Editor" visible on the toolbar and only the three options to be visible?
- how to set content area of the RadEditor to only manipulate image and disable of inserting texts, etc. ?
- how to disable "Url", "Target" and "comment" fields on Image Map Editor Dialog?

Thanks!

Rex 
0
Accepted
Rumen
Telerik team
answered on 23 Mar 2009, 05:08 PM
Hi Jorex,

At present the Image Map Editor could not be used as a standalone manager.

In addition the implementation of the requested feature with RadEditor will be hard because the user could paste undesired tags in the editor. In browsers like Safari and Google Chrome it is not possible to strip the pasted content and you should strip it on submit.

You can customize the toolbar set of tools of RadEditor by defining for example a custom ToolsFile.xml or defining the tools inline:

<telerik:RadEditor runat="server" OnClientSubmit="onclientsubmit" ID="RadEditor1">
    <Tools>
        <telerik:EditorToolGroup>
            <telerik:EditorTool Name="ImageManager" />
            <telerik:EditorTool Name="ImageMapDialog" />
            <telerik:EditorTool Name="SetImageProperties" />
        </telerik:EditorToolGroup>
    </Tools>
    <ImageManager ViewPaths="~/Images" UploadPaths="~/Images" />
</telerik:RadEditor> 

"how to set content area of the RadEditor to only manipulate image and disable of inserting texts, etc. ?" - The content area of RadEditor is a standard editable IFRAME element and the browser does not offer such functionality for stripping some tags. That is why you should write some custom javascript code to handle this and strip the undesired HTML tags. You can obtain the pasted content in IE and Firefox before its insertion in the content area using the OnClientPasteHtml client-side event. You can also strip the unwanted content on submit by attaching to the OnClientSubmit client-side event. Another approach is to strip the tags on the server.

"how to disable "Url", "Target" and "comment" fields on Image Map Editor Dialog?" - please, see this live example that shows how to modify the editor's built-in dialogs: Customize Built-in Dialogs.


All the best,
Rumen
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
jorex
Top achievements
Rank 1
answered on 24 Mar 2009, 01:37 AM
Hi Rumen,

Thank you for your response. :) I guess you might consider having Image Map Editor as a standalone manager in your future releases. That would be awesome! :)

Cheers!

Rex
0
CT
Top achievements
Rank 1
answered on 01 Nov 2012, 12:50 AM
Hi,

How can I get the data of the Areas and the Area Properties, e.g. Left, Top, Width, Height, URL, Target, Alt Text, Is it a Circle or rectangle shape, etc. per EACH Area. I need to save these data into database, one Area per record.

Can we have Ellipse also beside circle?
Thanks.
0
CT
Top achievements
Rank 1
answered on 01 Nov 2012, 12:50 AM
Hi,

How can I get the data of the Areas and the Area Properties, e.g. Left, Top, Width, Height, URL, Target, Alt Text, Is it a Circle or rectangle shape, etc. per EACH Area. I need to save these data into database, one Area per record.

Can we have Ellipse also beside circle?
Thanks.
0
Rumen
Telerik team
answered on 02 Nov 2012, 04:18 PM
Hi,

You can register the external dialogs of RadEditor which will allow you to edit the contents of the ImageMap.ascx dialog file. Since it is not possible to execute server code in the ascx dialog files you can add a usercontrol in the ImageMap.ascx and using its codebehind to save the field values in the desired location. You can see the following KB article which will show you how to add an user control and execute server code from it: Displaying single upload control in the FileBrowser Upload manager.

All the best,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Editor
Asked by
jorex
Top achievements
Rank 1
Answers by
jorex
Top achievements
Rank 1
Rumen
Telerik team
CT
Top achievements
Rank 1
Share this question
or