Hi Guys,
ANy help appreciated on this one as I'm really stuck but know the solution will be simple. Basically I have a javascript button on my page which will append text to the existing content in the CKEditor when clicked. Problem is I can't seem to get it to append. My code is as below
function addCaseStudiesTemplate() { var e = CKEDITOR.instances['ctl00_PageContent_oEdit1']; if(e){ e.value = e.value & 'Replace with th'; } }
I've tried variations around document.getElementById etc (which would not work when I had the text area set to a CKEditor, said the element id did not exist). I'm working in vb.net using a CKEditor.Replace all on the class of the textarea. e.value is getting the correct text from inside the editor but any appends are not appearing in the area. I tried using SetHTML however it said this method did not exist.
Any help or pointers appreciated as this is really holding me up now
Re: Appending text to editor using Javascript
Insert html was what I was looking for, found it eventually