I want to analyze the content written in the TinyMCE editor on the client side I want to get all the values ββof the src attributes of the images inserted into the editor (in the body of the article) and save them in an array.
How can i do this?
thanks
(I tried:
var arr = new Array(); $(".txtEditorClass img").each(function() {arr.push( $(this).attr("src"))});
This did not work. I also did a test using regular JS to see which images were found:
var arr = document.getElementsByTagName("img"); for(var i = 0; i < arr.length; i++) { alert(arr[i].src); } var arr = document.getElementsByTagName("img"); for(var i = 0; i < arr.length; i++) { alert(arr[i].src); } All images src image values ββoutside the editor where it is shown, but not the images embedded in the text of the letter)
source share