Re: textarea html generation problem

From: Date: Tue, 16 Sep 2008 04:05:06 +0000
Subject: Re: textarea html generation problem
References: 1  Groups: php.general php.general 
Request: Send a blank email to php-general+get-280253@lists.php.net to get a copy of this message
sean greenslade schrieb:
Hi all! I am trying to make a PHP HTML editor. I have made the entire editor function, but it has a big problem. If the page contains a </textarea> tag, it ends the editor's textarea and the browser starts rendering the HTML. How do I go about preventing this from happening? Thanks a lot! --Zootboy
I don't know a direct solution, but i would try to work around like this: -use entities inside the textarea for the brackets of the textarea ("&lt;" for "<" and "&gt;" for ">"). This should provide the Html-Code from bombing. - to provide real wysiwyg editing, maybe use a "div" as placeholder with similar grafic aspects. In both cases the workarounds can be identified by a regex and replaced after submitting the form. The textfield would be able to be displayed correctly in a test version, if provided. Maybe it would be helpfull to know more about your plans of the PHP HTML editor and it's provided functions. Sascha w3ksel Schulz

« previous php.general (#280253) next »