Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 84751

Image manager - overwrite issue

$
0
0

Rumen's solution of changing the EditorDialogs worked for me.  We also wanted to update the documents already in the RadEditor, so I added a tool to update the images.  Here is the relevant jquery that I used:

function refreshImages(editor) {

    var newID = Math.random();
    var hTML = editor.get_html(true);
    var $html = $(hTML);
    $html.find("image").each(function (i) {
        var src = $(this).attr("src");
            if (src.indexOf("?") > 0) {
                src = src.substring(0, src.indexOf("?") + 1) + "param=" + newID;
            } else {
                src += "?param=" + newID;
            }
            $(this).attr("src", src);
    });
    editor.set_html($("<p>").append($html).html());
}

 

 


Viewing all articles
Browse latest Browse all 84751

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>