Hello everyone, I'm using CKEditor on a project for work and I've been having great success until now.
I am looking to pop up CKEditor in a lightbox jquery window which, when called it loads an instance of CKEditor twice.
This is my code and I was wondering if anyone can see the error because I've been trying to find it for some time now.
PS - Sorry for untidy code, it's displaying strangely in the code box.
Any help is greatly appreciated and the code is embedded in 2 if statements, one which checks for a query string and another which checks for a successful SQL query.
I am looking to pop up CKEditor in a lightbox jquery window which, when called it loads an instance of CKEditor twice.
echo'<div id="newsEditArea"> <div class="editHolder"> <div class="editHeader"><img src="image/cclogo.png" height="24" width="138"/></div> <div class="editTab"> Edit News </div> <div class="editBody"> <form action="'.$_SERVER['PHP_SELF'].'" method="post"> <input type="hidden" name="newsid" value="' . $newsid . '" /> <textarea name="newsText" >'.$content.'</textarea> <script type="text/javascript"> if (CKEDITOR.instances[\'newsText\']) { CKEDITOR.instances[\'newsText\'].destroy(); } CKEDITOR.replace(\'newsText\'); </script> <input type="submit" value="Save" name="submit" /> <input type="reset" value="Cancel" id="closeIt" /> </form> </div> <div class="editFooter"> Thankyou for choosing Content Caretaker | Report a Problem | Google Analytics </div> </div> </div> <script type="text/javascript"> $(document).ready(function() { $(\'#newsEditArea\').lightbox_me({ centered: true, }); return false; }); </script>';
This is my code and I was wondering if anyone can see the error because I've been trying to find it for some time now.
PS - Sorry for untidy code, it's displaying strangely in the code box.
Any help is greatly appreciated and the code is embedded in 2 if statements, one which checks for a query string and another which checks for a successful SQL query.
Re: Duplicate Window!
Put it at the very end of the echo statement and it should work fine!