Jump to content

[SOLVED] problem with js?? CKEditor not displaying


Recommended Posts

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.