Markup inside form textareas? – PHP

  php

Q(Question):

Hi,

I am going to make a forum using PHP. However, I have a very simple question
to begin with. Is it at all possible to create input fields where users can
type their messages using italic, bold, blockquotes, and the like? So far I
have never witnessed it, my webmail client, for instance, only allows me to
write plain text in the "new e-mail" input form. And blogger, for instance,
does allow you to enter text in bold and italics, but you don’t *see* them:
instead, blogger inserts <em> and <strong> tags into the text area. Now
personally I am not afraid of markup tags, but I know a lot of my future
visitors who are. I have looked up the W3C HTML recommendation sections
dealing with forms, and those seem to suggest plain text is all I’m going to
get. Is there no way to create forms with wysiwyg hypertext textareas?

Sander

A(Answer):

"Sander Voerman" <me******@zonnet.nl> schrieb:

I have looked up the W3C HTML recommendation sections
dealing with forms, and those seem to suggest plain text is all I’m going to
get. Is there no way to create forms with wysiwyg hypertext textareas?

There is no way with (X)HTML/CSS/JavaScript. You could write a Java
program for this task.

Matthias

A(Answer):

On Mon, 11 Aug 2003 17:42:15 +0200, Sander Voerman wrote:

Hi,

I am going to make a forum using PHP. However, I have a very simple
question to begin with. Is it at all possible to create input fields where
users can type their messages using italic, bold, blockquotes, and the
like? So far I have never witnessed it, my webmail client, for instance,
only allows me to write plain text in the "new e-mail" input form. And
blogger, for instance, does allow you to enter text in bold and italics,
but you don’t *see* them: instead, blogger inserts <em> and <strong> tags
into the text area. Now personally I am not afraid of markup tags, but I
know a lot of my future visitors who are. I have looked up the W3C HTML
recommendation sections dealing with forms, and those seem to suggest
plain text is all I’m going to get. Is there no way to create forms with
wysiwyg hypertext textareas?

Sander

Try google for "rich text editor" +html or something

A(Answer):

In article <bh**********@news1.tilbu1.nb.home.nl>,
"Sander Voerman" <me******@zonnet.nl> wrote:

I am going to make a forum using PHP. However, I have a very simple question
to begin with. Is it at all possible to create input fields where users can
type their messages using italic, bold, blockquotes, and the like? So far I
have never witnessed it, my webmail client, for instance, only allows me to
write plain text in the "new e-mail" input form. And blogger, for instance,
does allow you to enter text in bold and italics, but you don’t *see* them:
instead, blogger inserts <em> and <strong> tags into the text area. Now
personally I am not afraid of markup tags, but I know a lot of my future
visitors who are. I have looked up the W3C HTML recommendation sections
dealing with forms, and those seem to suggest plain text is all I’m going to
get. Is there no way to create forms with wysiwyg hypertext textareas?

http://www.bris.ac.uk/is/projects/cms/ttw/ttw.html


CC

A(Answer):

Sander Voerman wrote:

Hi,

I am going to make a forum using PHP. However, I have a very simple question
to begin with. Is it at all possible to create input fields where users can
type their messages using italic, bold, blockquotes, and the like? So far I
have never witnessed it, my webmail client, for instance, only allows me to
write plain text in the "new e-mail" input form. And blogger, for instance,
does allow you to enter text in bold and italics, but you don’t *see* them:
instead, blogger inserts <em> and <strong> tags into the text area. Now
personally I am not afraid of markup tags, but I know a lot of my future
visitors who are. I have looked up the W3C HTML recommendation sections
dealing with forms, and those seem to suggest plain text is all I’m going to
get. Is there no way to create forms with wysiwyg hypertext textareas?

You don’t want the users blithely sticking in raw HTML, too much chance
of a screwup. What some forums do is to create their own tag set, for a
small set of markup tags. The form handler then substitutes these tags
with proper markup.

A typical tag set used in these system is (note the
square brackets) to use in replying to a message. You can have a reply
generator automagically present the quoted stuff in these tags, the
respondent can edit that as desired.

This will be replaced by some system-designed quoting mechanism (often
indented with a different background or something). The program would
just replace these made-up tags with <span> or the like with the CSS
classes to control presentation.

Brian Rodenborn

A(Answer):

"Sander Voerman" <me******@zonnet.nl> schrieb:

I was afraid someone was going to say that… yeah I could write a message
editor applet in java (sigh). However, in a lot of places java applets are
disabled on browsers, presumably for security reasons. Can I use PHP to
figure out whether the browser supports applets or not, so that I can
provide a simple plain text message form as an alternative?

I don’t think so. Maybe you could write a little Java-Applet which
redirects to an other page, but I’m no Java expert.

Matthias

A(Answer):

Wow!! Thanks!

http://www.bris.ac.uk/is/projects/cms/ttw/ttw.html


CC

LEAVE A COMMENT