htmlArea

A directory of browser-based WYSIWYG editors

  MAIN
INDEX
SEARCH
POSTS
WHO'S
ONLINE
LOG
IN

Home: htmlArea 2: htmlArea 2 & 3 archive (read only): htmlArea v2.0:
nested textarea tags


The htmlArea 2 & 3 editors have been discontinued.

We've made these forums available as a read-only reference and knowledge-base for people using or developing editors based on htmlArea 2 or 3.

Anyone who is interested in taking over version 2 or 3 is free to do so. All we ask is that you choose a new name that doesn't have "htmlarea" in it to avoid confusion with this site. We'll even give you a link in the directory to make it easier for people to find you. If you are developing or hosting an htmlArea based-editor under a new name, please submit it to our directory.

 


SnakeOil
New User

Mar 26, 2003, 1:44 AM

Post #1 of 5 (3363 views)
Shortcut
nested textarea tags Can't Post

Hi folks

Apologies if this has been covered but I've searched through and couldn't find anything about the problem I'm having although I'd suspect others have come across it - here goes:

I'm using html area as part of a cms using php & mysql.

One of the content objects is a form with a textarea.

When I paste the form html into html area and save, when it is reopened the close textarea tag within my form is taken as the end of the html area textarea (I'm not actually sure if this is happening in IE, PHP or html area but it's not in MySQL as I can edit the html from here with no problem). I end up with part of the form in the textarea window and part of the form below it on the content admin page. When resaved the form is cut off at this spot.

If I use special characters to define the end textarea tag it works once, but not when re-edited (as the standard characters are restored). Can anyone help? If you have a code example of how to solve this, that would be great, but even a pointer in the right direction would be much appreciated as I'm no master coder, but can nut things out if I know where to start.

Cheers


(This post was edited by SnakeOil on Mar 26, 2003, 1:47 AM)


schorhr
User

Mar 31, 2003, 1:25 AM

Post #2 of 5 (3302 views)
Shortcut
Re: [SnakeOil] nested textarea tags [In reply to] Can't Post

Similar problems here---

You mention that you use a replacement text (such as <!end textarea!>)...

You replace it and save it to the database, right?

DO this:
Do not replace it when storing the page into the DB;
When displaying the page, write a PHP Script that displays the file/Page, and THEN temporary replace the substitute tag ;)

Marcus


shepherd
Novice

Mar 18, 2004, 1:31 PM

Post #3 of 5 (3055 views)
Shortcut
Re: [SnakeOil] nested textarea tags [In reply to] Can't Post

I'm having similar problems here.

I am trying to write a CMS which loads a file into the HTMLarea on my admin page. however if the loaded file includes a textarea, then the javascript chokes and cuts off the HTMLArea.

Although I've worked around this problem by changing the <textarea> tag into a <text area> tag, which I then change back before saving to the db, this solution is less then optimal since The textarea is not displayed along with all the other form elements. This isnt terrible, but it defeats the wysiwig-ness of HTMLArea.

However I notice that it is fine to use the insertHTML script to add a textarea. is there a way I can automagically run it thru something similar?


shepherd
Novice

Mar 18, 2004, 1:48 PM

Post #4 of 5 (3053 views)
Shortcut
Re: [shepherd] nested textarea tags [In reply to] Can't Post

actually, nevermind. HTMLArea is waaay smarter then I gave it credit for! I read another post which pointed me in the right direction. You can just run it thru an HTML filter which converts all the special chars <,>.& , etc to lt; etc. and it handles it for you!

in php you could do...

Code
$data = htmlspecialchars($data);



randys
New User

Nov 24, 2004, 8:52 AM

Post #5 of 5 (2664 views)
Shortcut
Seem to need white space for nested textareas? [In reply to] Can't Post

I am still having difficulties with this issue, even with using htmlentities on the data. I find that unless there is at least some white space in the pasted textarea, the closing tag gets cut off, no matter what I try before displaying or after saving with htmlarea. E.g., This works fine:


Code
   <textarea ROWS="2" COLS="20"> </textarea>

This does not:


Code
   <textarea ROWS="2" COLS="20"></textarea>



Has anyone else found similar results? Is this a bug? Browser: W IE 6


(This post was edited by randys on Nov 24, 2004, 10:44 AM)

 
 
 


Search for (options)