Insert Image

2 posts, 0 answers
  1. Tolga Tari
    Tolga Tari avatar
    4 posts
    Member since:
    Nov 2008

    Posted 11 Sep 2013 Link to this post

    Hi, Im using that code block for add small image on the main image. Everything is fine, but when i add the small image on the main page, i can not change that small image position. I want move with mouse that small image after add.

    Also, what is the insertImage last array parameter?

    function imageEditorAddImage(img)
        var imgEditor = $find("imageEditor");
        imgEditor.insertImage(50, 50, '../../theme/images/editorImages/' + img, []);

    Thank you
  2. Slav
    Slav avatar
    1351 posts

    Posted 16 Sep 2013 Link to this post

    Hello Tolga,

    After executing the insertImage function, the added picture becomes a part of the main image and it cannot be edited further. What you could do is fire the Insert Image command
    that will display the dialog for inserting an image. The following code snippet will allow you to directly include the path to your picture in the input field of the dialog when it is opened:
    $find("imageEditor").add_dialogLoaded(function (editor, args) {
        var widget = args.get_widget();
        widget._txtSrc.value = "path-to-small-picture";

    As for the last parameter of the function insertImage, it is used for setting operations that will modify the inserted image. This parameter is not documented, because it needs further improvement.

    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 the blog feed now.
  3. DevCraft R3 2016 release webinar banner
Back to Top