i have the following javascript that gets HTML from somewhere and sticks it in a textarea for tinymce.
My question is how in asp.net-mvc i can get the HTML Here and stick it in the javascript?
Do i put this in ViewData?
function ajaxLoad() {
var ed = tinyMCE.get('elm1');
// Do you ajax call here, window.setTimeout fakes ajax call
ed.setProgressState(1); // Show progress
window.setTimeout(function() {
ed.setProgressState(0); // Hide progress
ed.setContent('HTML Here');
}, 500);
}
i want to have something like this below, but it doesn't seem to work:
function ajaxLoad() {
var ed = tinyMCE.get('elm1');
// Do you ajax call here, window.setTimeout fakes ajax call
ed.setProgressState(1); // Show progress
window.setTimeout(function() {
ed.setProgressState(0); // Hide progress
ed.setContent(<% ViewData["test"] %>);
}, 500);
}