Forum Moderators: coopster

Message Too Old, No Replies

Edit text script

Edit text script

         

PumpkinHead

9:33 am on Jun 30, 2005 (gmt 0)

10+ Year Member



Hi all,

I'm developing a website for someone and they need a few dynamic pages, so I've populated these pages from a MySQL database. I've already created an area where they can log-in to amend these pages using a simple PHP form.

I'm pretty new to this side of PHP, so I've used a standard HTML text area which then populates a MySQL row (Field type = 'text')....I've no idea if this is how things are normally done.

Anyway, this approach works fine for me as I know HTML...I can set everything in <p> tags etc and <b>old text but the long term aim is for the website owner (who has no HTML skills) to log-in and amend their own details.

Couple of questions....

1. I'm looking for a script(?) similar to the ones used by most forum packages that lets the user highlight their text and then clicks the "B" button to bold their selection, or clicks the "URL" button to add <url> tags etc. Can someone please tell me what I should be searching for as I can't seem to find this anywhere!

2. Am I using the right field type (text).

Hope this makes sense to someone!

Cheers :)

dreamcatcher

2:33 pm on Jun 30, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi PumpkinHead,

What you are looking for are called Rich Text Editors I believe.

This open source one might be ok for you:
[kevinroth.com...]

dc

ergophobe

4:54 pm on Jun 30, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



For rich text editors, I think TinyMCE is best of the bunch unless you want a full XML thing like bitflux.

FCKeditor and HTMLArea are also popular.

You can also get bulletin board style editors like you're talking about from almost any bulletin board and most blogs and CMS.

As for the MySQL field, text is probably your best bet.

dreamcatcher

7:15 pm on Jun 30, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



HTMLArea, thats the one I was trying to think of. Thanks for jogging my memory ergophobe.

henry0

7:39 pm on Jun 30, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



A BB script offers more security
using it to only allows BB code that are non HTML tags

A class does that job for you
look for BBCode developed by Leif K-Brooks
it is licensed under the PHP license.

<edit>addition</edit>
If I use a full editor I use SPAW the last version can be modified to add a few img pluggins named ibrowser and imanager (GPL)
It works great I have been lucky to be involded with the delopper in the final steps of ibrowser making .

PumpkinHead

10:54 pm on Jun 30, 2005 (gmt 0)

10+ Year Member



Great thanks for the replies. I take it I just plug the output into the text field?