Hi,
How do I set text in CKEditor? CKEditor also needs to integrate with ckfinder.
I tried doing
// I need to set ckeditor text with a value in code behind. To get that value from code bhind, I am using a div which would be set in code behind. This is not hidden currently but I would do that eventually. I need to set this value to my ckeditor. <div id = "editortext" runat = "server"></div> <textarea id="editor1" name="editor1"></textarea> <script type="text/javascript"> window.onload = function () { var edt = CKEDITOR.replace('editor1', { toolbar: 'Basic' }); CKFinder.setupCKEditor(edt, '/ckfinder/'); var t = <%=editortext.InnerText %>; CKEDITOR.instances.editor1.setData(t); }
</script>
If I put some static text for t, var t = "Some Text";
and then set
CKEDITOR.instances.editor1.setData(t); it works fine.
If I use,
var t = <%=editortext.InnerText %>; CKEDITOR.instances.editor1.setData(t);
ckeditor is no longer displayed. Only text area is displayed. How to set text in ckeditor ? Please help
Help Please !
Hi,
I know that I'm late, but I'm becoming hopeless
I've been searching the whole day for this and I've just seen your post, please If it worked for you give me a tip.
Thank you in advance for your help.
Regards.
Hy,
Hy,
did you try:
bye