SaturdayNightSpecial Posted August 29, 2009 Share Posted August 29, 2009 Hello, I tried posting this question on the CKEditor forum but haven't received any replies so hopefully someone here can help. I've been working on this for 2 days and just can't figure it out. I'm building a PHP/mySQL site where users will be able to upload their news through a form. The problem comes in when I try to display the article on the detail page. I need the dynamic data to keep all the formatting of the article, for instance, Bold, breaks etc. I've studied all through the nl2br, <pre> htmlencode etc and it doesn't appear that I can accomplish that entirely without using an html editor. If anyone knows how I can do that without using the editor that would be preferable. But anyway, I did go ahead and installed CKEditor but I can't get it to display on my page. I know the installation is OK because the CKEditor samples display fine. It also appears that the text area is OK since it displays the default text. I'm getting no errors but there must be something I'm missing here. Here's the code as I have it now: <head> <script type="text/javascript" src="/ckeditor/ckeditor.js"></script> <td bordercolor="#000000"><textarea name="nf_editor"><p>Initial value.</p></textarea> <script type="text/javascript"> CKEDITOR.replace( 'nf_editor' ); </script> <script type="text/javascript"> window.onload = function() { CKEDITOR.replace( 'nf_editor' ); }; </script> This seems that it should be pretty simple even for someone like me that knows nothing about js but I've tried everything and nothing works. All comments would be greatly appreciated. Thanks in advance. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.