Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    Regular Coder
    Join Date
    Feb 2005
    Posts
    663
    Thanks
    5
    Thanked 14 Times in 14 Posts

    WYSIWYG Question

    I'm preparing to likely add a a text area into a form where the user can input some custom comments. The info will than be posted to a database for later viewing on a 'splash screen' of a page.

    I've come across fckeditor and tinymce, but does anyone have any recommendations on any other free WYSIWYG type editors?
    Last edited by ptmuldoon; 06-30-2007 at 03:34 PM.

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    Regular Coder
    Join Date
    Feb 2005
    Posts
    663
    Thanks
    5
    Thanked 14 Times in 14 Posts
    Thanks.

    That looks promising, and simpler than the two I mentioned.

  • #4
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    If you are going to just be submitting info to a database then I think you should go with what I recommended. I use it on a few of my sites. Its simple and gets the job done.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #5
    Regular Coder
    Join Date
    Feb 2005
    Posts
    663
    Thanks
    5
    Thanked 14 Times in 14 Posts
    For some strange reason, I can't seem to get the info to post into my database. I'm been scouring the forums of the sites homepage, and unsure of what could be wrong. The editor works, and I type in the text area, but nothing is being posted. (I'm trying to register there, but not receiving their activation link).

    This is basically what I have.

    In my form, I have:
    PHP Code:
    <form name="newgame" id="newgame" action="includes/create.php" method="post">

    <td>    
        <?php $CONTENT stripslashes($row['content']); ?>
            <textarea name="content" id="content" style="height: 250px; width: 558px;"><?php echo $CONTENT?></textarea>
            <script language="javascript1.2">
                generate_wysiwyg('content');
            </script>
    </td>

    </form>
    and in my action (create.php file) I have the following:
    PHP Code:
    $custom_rules $_POST['content'];

    $sql "INSERT INTO games (custom_rules) "
            
    ." VALUES ('$custom_rules')"

  • #6
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Where do you actually run your query? Having this alone does nothing.
    PHP Code:
    $custom_rules $_POST['content'];

    $sql "INSERT INTO games (custom_rules) "
            
    ." VALUES ('$custom_rules')"
    Post the rest of create.php.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #7
    Regular Coder
    Join Date
    Feb 2005
    Posts
    663
    Thanks
    5
    Thanked 14 Times in 14 Posts
    yeah, I was trying to avoid posting the entire file, as its a little long. What I went and just did was create a copy of the file, saving it to txt format, and posted it on my site.

    Basically, I'm inserting a new row into a table called 'games'. Everything else from the form is added except the wysiwyg information.

    The entire file can be viewed Here. The code adding it to the table is located near the bottom, near this line:

    // CREATE GAME REFERENCE IN GAMES TABLE

  • #8
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Echo $custom_rules to see if its getting posted or not.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #9
    Regular Coder
    Join Date
    Feb 2005
    Posts
    663
    Thanks
    5
    Thanked 14 Times in 14 Posts
    echoing $custom_rules just gives me a blank page. But I think it may be something with the wysiwyg editor, or maybe a script issue or conflict. If I put basic text or html inside the textarea tags, the that html is posted into the database. But nothing I type in the wysiwyg editor is added in it.
    PHP Code:
    <textarea name="custom_rules" id="textarea1" style="height: 250px; width: 558px; background-color:#CCCCCC;">
    <table border="0" cellpadding="0" cellspacing="0" style="margin-left: 10px;">
         <tr>
              <td>    
                <?php $CONTENT stripslashes($row['content']); ?>
                <?php echo $CONTENT?>
            </td> 
         </tr>
    </table>
    </textarea>
    <script language="javascript1.2">
      generate_wysiwyg('textarea1');
    </script>


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •