HTML Help Forum HTML Help
Please Search for the answer to your question before asking it! Thanks.
 

Text area
Post a Reply to this Topic Ask a New Question
Click here to go to the original topic
       HTML Help Forum -> PHP
View previous topic :: View next topic  
Author Message
Zaphieon



Joined: 13 Oct 2009
Posts: 8

Posted: Tue Oct 13, 2009 11:28 am     Text area  

This is what I have -- it works but I want when you hit Enter to make a new line..

Also would love to implement a WYSIWYG editor into it.. but thats above my knownledge.

Code: <?php
$loadcontent = "bio.htm";
    if($save_file) {
        $savecontent = stripslashes($savecontent);
        $fp = @fopen($loadcontent, "w");
        if ($fp) {
            fwrite($fp, $savecontent);
            fclose($fp);
                               }
                }
    $fp = @fopen($loadcontent, "r");
        $loadcontent = fread($fp, filesize($loadcontent));
        $loadcontent = htmlspecialchars($loadcontent);
        fclose($fp);

?>
<form method=post action="<?=$_SERVER['PHP_SELF']?>">
<textarea name="savecontent" cols="70" rows="25"><?=$loadcontent?></textarea>
<br>
<input type="submit" name="save_file" value="Save"> 
</form>
PayneLess Designs



Joined: 28 Feb 2007
Posts: 4255
Location: MS

Posted: Tue Oct 13, 2009 7:19 pm      

Can't test any PHP, but there may be a PHP version of this:

TinyMCE - Javascript WYSIWYG Editor

Maybe...

WYSIWYG HTML editor

Quote: WYSIWYG HTML EditorThese are free WYSIWYG HTML editors that can be easily implemented in your site to allow your visitors to post html content and photos


This may help you solve your new line problem:

Mailer - New lines within textarea problem
New line or break line on TextArea Fields
 
 
DARFUR
HOSTING / DESIGN
MAKE MONEY

       HTML Help Forum -> PHP
Page 1 of 1


Powered by phpBB Search Engine Indexer
Powered by phpBB 2.0.19 © 2001, 2002 phpBB Group