I'm using CLEditor for a website I'm working on. I'm trying to add dynamic text to the textarea with jQuery. Usually I'll be using something like:
$('#myText').val('Here some dynamic text');
But this just doesn't work with CLEditor. When disabling CLEditor it works fine however, enabling it again the text just disappears. I tried looking on the website for a solution, but I can't find any. Anyone had the same problem lately?
Thanks in advance.
CLEditor update iFrame content when blur method of textarea is called:
//make CLEditor
$(document).ready(function() {
$('#text').cleditor();
});
//set value
$('#text').val('new text data').blur();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With