Get List of Action Names Prior to Save

2 posts, 1 answers
  1. Yazan
    Yazan avatar
    4 posts
    Member since:
    Oct 2014

    Posted 28 Dec 2015 Link to this post

    I've implemented the Image Editor custom save. My goal is to get a list of the actions performed on the image. Like: ["Pencil", "DrawCircle", DrawRectangle"]. I know that the desired list does get populated when clicking on the undo button (the little arrow part). My problem is that I couldn't find a way to get access to this list (neither from client nor from the server side). The reason I need that list is that I have to log the steps that led to the enhanced image. Thanks for your help.
  2. Answer
    Vessy
    Admin
    Vessy avatar
    1380 posts

    Posted 29 Dec 2015 Link to this post

    Hi Yazan,

    The undo stack containing all commands executed in RadImageEditor can be accessed on the client-side in a similar way:
    function myfunction() {
        var imageEditor = $find("<%=RadImageEditor1.ClientID %>");
        var undoStack = imageEditor._undoStack.slice();
        for (var i = 0; i < undoStack.length; i++) {
            console.log(undoStack[i].get_name());
        }
    }

    I hope this helps.

    Regards,
    Vessy
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top