Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP How-To
|
PHP How-To Post your "How do I do this with PHP?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 2nd, 2004, 09:07 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anshul
Default write HTML into TEXTAREA using PHP

i m using 'htmlarea' as TEXTAREA in a FORM to let users insert data.
( http://www.htmlarea.com/ )

users can write WYSIWYG type HTML code; that gets inserted ( as e.g. this is <STRONG>India</STRONG> today. ) into db.

a big problem is now i want2call this is <STRONG>India</STRONG> today. from db into (value attribute!) of TEXTAREA

is should display as: this is India today.
so users can edit posted content easily.

__________________
`~@#\^%&*/\.<.\/-|+|_!:;..=?>
PHP, SEO | anshul shrivastava | mediasworks.org | FB
 
Old December 2nd, 2004, 10:52 AM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

Which version of HTMLArea are you using?? The API is pretty different between v2 and v3.

Regards,
Rich

--
[http://www.smilingsouls.net]
Mail_IMAP: A PHP/C-Client/PEAR solution for webmail
Author: Beginning CSS: Cascading Style Sheets For Web Design
 
Old December 2nd, 2004, 11:49 AM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

Ok, just looked at my implementation of HTMLArea. I am using v2 for IE and v3 for Firefox, both versions take the value from the textarea and place that value into the WYSIWYG automatically. So all you have to do is insert the value into the textarea like you normally would (e.g. between <textarea> and </textarea> tags). If on the other hand you have to insert a value after the WYSIWYG has loaded, have a look at the JS source, htmlarea.js, for the right method.

Regards,
Rich

--
[http://www.smilingsouls.net]
Mail_IMAP: A PHP/C-Client/PEAR solution for webmail
Author: Beginning CSS: Cascading Style Sheets For Web Design
 
Old December 4th, 2004, 05:08 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anshul
Default

thank u richard, i m using htmlArea v2.03

mistake was just that i put <textarea value="html_markup"></textarea>
as you know, it should be <textarea>html_markup</textarea>

other simple question, i've: how to prevent abuse of javascript code, users enter ? any other concern for discipline of users ?

 
Old March 5th, 2009, 07:12 AM
Registered User
 
Join Date: Nov 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default text formatting script needed in html /javascript

Hi , i just need a script to make text bold italic underline and save html format , please post link if anybody knows
Readin
http://askmeflash.com
 
Old March 12th, 2009, 01:16 AM
Authorized User
 
Join Date: Jul 2008
Posts: 18
Thanks: 0
Thanked 2 Times in 2 Posts
Default Free RichText Editor

Try out these links

http://koivi.com/WYSIWYG-Editor/

http://www.freerichtexteditor.com/download/
 
Old March 27th, 2009, 12:15 PM
Registered User
 
Join Date: Mar 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default A little more help

Hello 12345:


Quote:

Hi , i just need a script to make text bold italic underline and save html format
I think surya posted some excellent suggestions. Another alternative is to use biterscripting (http://www.biterscripting.com .) . It will allow you to do this activity at run-time, right as part of your web server, although the earlier suggestions may also work that way.

When trying biterscripting, make sure you follow instructions at http://www.biterscripting.com/install.html . That will download all their sample scripts, so you can look at all the coding and scripting samples.

Randi





Similar Threads
Thread Thread Starter Forum Replies Last Post
saving data from HTML textarea Durkee VB.NET 2002/2003 Basics 4 May 9th, 2008 09:25 AM
TEXTAREA Scrollbar Suppression in HTML or VBScript Ron Howerton HTML Code Clinic 7 January 8th, 2007 02:02 AM
Displaying textarea content to html table keithc Pro PHP 2 December 1st, 2006 03:12 AM
TEXTAREA tag in html sapphire87 PHP How-To 0 July 26th, 2006 02:25 PM
html textarea to DB ginoitalo Beginning PHP 1 May 30th, 2005 01:49 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.