dare87 Posted April 11, 2008 Share Posted April 11, 2008 I have this simple form that allows me to add news to my website, but I am running into a problem. I now have other people entering in information. The problem I am having is that I just right the news in html, because I want br and such but is there a way to just read the textarea as text and not html? example of what I want. How are you doing today? I am doing fine, thanks. Vs. How are you doing today?<br><br>I am doing fine, thanks. Here is my form. <form name="composeNews" action="news_compose.php" method="post"> <table align="center" width="100%" border="0" cellpadding="1" cellspacing="0"> <tr> <td class="title" colspan="2">Compose - News</td> </tr> <tr> <td>Title:</td> <td><input type="text" class="required" name="title" id="focus" size="40" value="" maxlength="200"></td> </tr> <tr> <td> </td> <td> <input type="button" class="button" name="addURL" value="Add Link" onClick="addUrl();"> <input type="button" class="button" name="addPicture" value="Add Image" onClick="addImg();"> <input type="button" class="bold" name="bold" value="B" onClick="boldText();"> <input type="button" class="italic" name="bold" value="I" onClick="italicText();"> <input type="button" class="underline" name="bold" value="U" onClick="underlineText();"> </td> </tr> <tr> <td>Article:</td> <td><textarea class="required" name="article" rows="5" cols="50"></textarea></td> </tr> <tr> <td> </td> <td><input type="submit" class="button" name="submit" value="Submit"></td> </tr> <tr> <td> </td> <td class="smallText">* Highlighted forms designate required fields.</td> </tr> </table> </form> Thanks Link to comment https://forums.phpfreaks.com/topic/100731-solved-textarea/ Share on other sites More sharing options...
BlueSkyIS Posted April 11, 2008 Share Posted April 11, 2008 i'm not entirely clear on what you're looking for. but if you're trying to display the HTML in the textarea as it would be displayed on a website and provide the ability to edit the content that way, search for tinyMCE, a javascript that does this really well. Link to comment https://forums.phpfreaks.com/topic/100731-solved-textarea/#findComment-515205 Share on other sites More sharing options...
dare87 Posted April 11, 2008 Author Share Posted April 11, 2008 That is what I want, I just don't want that form, I would like to incorporate it into the current form. I like it; I just don't want that look. Thanks Link to comment https://forums.phpfreaks.com/topic/100731-solved-textarea/#findComment-515232 Share on other sites More sharing options...
AndyB Posted April 11, 2008 Share Posted April 11, 2008 If you read a little about TinyMCE, you'll soon find out how it can be applied to any form you want. It's highly configurable and you should be able to mmake it domas much or as little as you want. Link to comment https://forums.phpfreaks.com/topic/100731-solved-textarea/#findComment-515279 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.