My requirement is that, I need to display the values entered by the user in the image properties of the dialog box in the CKEditor. How to display that? For example:- if there is a field description and if the user has entered anything in that field, then along with image, that description should also be displayed in the CKEditor. How to do that?
dialogDefinition.onOk = function(e) {
var imageSrcUrl = e.sender.originalElement.$.src;
//var description = $("#imageDescription").getValue();
var description="this is the description";
var imgHtml = CKEDITOR.dom.element.createFromHtml("<table><tr><td><img src=" + imageSrcUrl + " alt='' /><td></tr><tr><td>"+description+"</td></tr></table>");
editor.insertElement(imgHtml);
}
Please tell me how to get the value of the textfield?
Youre looking for
getValuemethod. Also see an official guide (+ part 2) to dialog development.