Add text to an image on specific position via JavaScript
Environment
Product | RadImageEditor for ASP.NET AJAX |
Description
Learn below how to add text to an image on specific position within RadImageEditor.
Solution
You can attach a button click event and execute the function below to get a reference to the ImageEditor and add text to an image on a specific position:
function AddTextToImage() {
var editor = $find("<%=RadImageEditor.ClientID%>"); //get reference to RadImageEditor on the client
var text = new Telerik.Web.UI.ImageEditor.ImageText();
text.set_text("Test !!!");
editor.addTextToImage(20, 50, text);
}