Rad Editor - Image Map Editor Objects

7 posts, 1 answers
  1. jorex
    jorex avatar
    16 posts
    Member since:
    Jan 2009

    Posted 18 Mar 2009 Link to this post

    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
  2. jorex
    jorex avatar
    16 posts
    Member since:
    Jan 2009

    Posted 18 Mar 2009 Link to this post

    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 
  3. Answer
    Rumen
    Admin
    Rumen avatar
    14324 posts

    Posted 23 Mar 2009 Link to this post

    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.
  4. jorex
    jorex avatar
    16 posts
    Member since:
    Jan 2009

    Posted 23 Mar 2009 Link to this post

    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
  5. CT
    CT avatar
    3 posts
    Member since:
    Dec 2009

    Posted 31 Oct 2012 Link to this post

    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.
  6. CT
    CT avatar
    3 posts
    Member since:
    Dec 2009

    Posted 31 Oct 2012 Link to this post

    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.
  7. Rumen
    Admin
    Rumen avatar
    14324 posts

    Posted 02 Nov 2012 Link to this post

    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.
Back to Top