Forum Moderators: coopster

Message Too Old, No Replies

Need a php rich text box

Is there such a thing?

         

one_mind

6:14 am on Nov 14, 2005 (gmt 0)

10+ Year Member



Hi,

I have a simple 2 way chat page setup where a user inputs text into a textarea and then my php script inserts it into mysql. What i need is a way to display these messages in a textarea that allows me to use different colors for each message.

It is impossible to format text output to a html textarea as you can only set the font color once in the textareas main tag and you cant use span or any php or html attributes in the text area.

Is the something similar to a textarea that allows outputing different colored text without using java or javascript and only use php?

I just need a way to output different colored text to a scrollable box. I would prefer not to use frames.

Thanks for any suggestions.

coopster

2:25 pm on Nov 14, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



There are quite a few rich text editors out there that do exactly this ... well, except that they are using JavaScript, as you stated. I'm not certain that your request is possible without it.

ergophobe

7:07 pm on Nov 14, 2005 (gmt 0)

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



I think your options are JS, Java and perhaps Flash.

You can do some other things like formatted "click to edit" text where when you click on it, it opens a textarea but otherwise displays normally, but that's JS-driven obviously.

Are you worried about the users who have JS disabled, or users who don't want to wait for the download for the fairly hefty RTE? I know TinyMCE in the next release will have built-in JS compression, so that should ease things a bit. I believe the other open source one that has buzz lately (theg or thug or something like that) has or is planning to soon have JS compression as well.

one_mind

3:17 am on Nov 15, 2005 (gmt 0)

10+ Year Member



Thanks guys,

The java script rich text boxes look great but are a bit overkill for what i needed. I dont need the user to be able to format text, just output formatted text to a scrollable window.

I ended up just using a scrollable div and it works great.

Thanks again