Help - Search - Members - Calendar
Full Version: Table inside textarea
HTMLHelp Forums > Web Authoring > Markup (HTML, XHTML, XML)
kingmaruthu
Is it possible to create a table inside a text area. or similar such control ?????
Darin McGrew
No, a textarea element can contain only plain text.
Frederiek
No. See http://htmlhelp.com/reference/html40/tables/table.html.
Unless you want to show the code of a table in a textarea.
kingmaruthu
QUOTE(Frederiek @ Jan 10 2008, 01:49 PM) *

No. See http://htmlhelp.com/reference/html40/tables/table.html.
Unless you want to show the code of a table in a textarea.


blink.gif so does it mean, I need to search for alternate means like ajax or innerhtml / ihtml ?????
kingmaruthu
QUOTE(Darin McGrew @ Jan 10 2008, 01:48 PM) *

No, a textarea element can contain only plain text.


blink.gif Cool !! what r the other means !!! then
Darin McGrew
QUOTE
what r the other means !!!
The other means to what end? What are you trying to do?
Christian J
If you want a scrollbar around a table you can use CSS "overflow".

A textarea is meant for entering form data. If you want to enter the form data in table cell format, you might put one textfield or textarea inside each table cell.
shankar from vizag
Greetings,

I want to place a big html textarea with some options like Bold, Italic, Linespacing, Fontsize, Font color, Insert table just similar to this page. with which user can edit the entered text inside the textarea.

Is this possible ?

regards
pandy
Yeah. We've done it. laugh.gif

There are ready-made scripts for that you can use. I don't know what's hot ATM. Here's one, but I don't know if it's a good one.
https://www.sceditor.com/
Christian J
I think pandy means that you can use "BBCode", which is basically any kind of markup that users can type in a text field. For example, this forum uses

CODE
[b]text[/b]

to mark up bold text. Scripting then changes the BBCode into real HTML/CSS.

Just beware of allowing users to type real HTML, like

CODE
<b>text</b>

since it can be used for malicious code injection (unless you only allow a very limited whitelist).



pandy
No. I meant that there are ready-made editors (or what they should be called) that you can use with your own forum, blog or page comments or whatever it is you are creating. Like a component you can include in your own code. I'm not totally sure any more that the one I linked to works that way.

BB-code isn't of much use if nothing interprets it. You could write your own, of course, but I got the impression that wasn't on the table. Maybe I'm wrong.
Christian J
I was think more of the general principle of using (non-HTML) markup, wether you create it yourself or use someone else's.
Christian J
QUOTE(shankar from vizag @ Aug 6 2019, 03:41 PM) *

Insert table

This can be a bit tricky though: how is the user going add content into the table cells? But inserting a table already containing content (like this week's calendar?) should be possible.
pandy
How do you mean? We can create a table here.
Christian J
QUOTE(pandy @ Aug 7 2019, 04:48 PM) *

How do you mean? We can create a table here.

Can we? How? unsure.gif
pandy
Hmm, it seems we can't. I thought that worked at all forums of this type. It has been around forever. The bbCode is the same as in HTML but with square brackets.


CODE
[table]
   [tr]
      [td]This[/td]
      [td]is[/td]
   [/tr]
   [tr]
      [td]a[/td]
      [td]table![/td]
   [/tr]
[/table]
Christian J
Aha! Haven't seen that before. I can imagine it's easy to make mistakes constructing it though (just like when writing ordinary HTML tables).
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2019 Invision Power Services, Inc.