Quantcast
Channel: AjaxControlToolkit Work Item Rss Feed
Viewing all articles
Browse latest Browse all 4356

Created Unassigned: get and set content in HtmlEditorExtender using javascript [27435]

$
0
0
For the javascript developers It will be nice if you could create a kind of get_content() and set_content() for the htmleditorextender that will simplify the read and save of the content using javascript and take care of such issues such as the decoding and the active viewmode.

Basically something that will avoid a piece of code such as the one I programed to set the content of the extender using javascript.

if (typeof ($find) != "undefined") {
var id = formField.id + "_HTMLEDITOREXTENDER";
var htmlEditorExtender = $find(id);
if (htmlEditorExtender != null) {
if (htmlEditorExtender._viewMode == "source") {
if (htmlEditorExtender._sourceViewDiv.textContent != undefined) {
htmlEditorExtender._sourceViewDiv.textContent = HtmlDecode(fieldValue);
}
else { htmlEditorExtender._sourceViewDiv.innerText = HtmlDecode(fieldValue); }
}
else {
htmlEditorExtender._editableDiv.innerHTML = HtmlDecode(fieldValue);
}
}
}


Viewing all articles
Browse latest Browse all 4356

Trending Articles



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