I'd like it to be a sub as opposed to a module.
A javaScript / Perl hybrid would do too.
Thanks.
It had some display problems, and I noticed [CTRL]+[INS] / [SHIFT]+[INS] did not work for copy / paste, (neither did [CTRL]+[C] / [CTRL]+[V]... standard shortcuts in most MS platform apps).
I see a lot of "textarea replacements", but most seem limited in one or more ways. The one on eBay that I mentioned does a nice job and allows you cut and paste with hot keys and to switch back and forth between TEXT and HTML editing.
Also, fkeditor wasn't Perl... so probably not gonna do it, but thanks for postings.
Thanks for posting though --- I'll keep trying anything anyone suggests.
My requirements are fairly simple (I don't need a lot of the features of some of the replacements I've seen).
- handle basic HTML tags, <B>, <I>, <U>, etc..
- handle form elements in HTML, (ie- TEXTAREA input)
- handle special chars. hopefully something that will allow me to enter "%20" or "©" and submit the actual escape sequences and NOT re-display them as the escaped characters if the HTML is brought back into the editor.
A typical problem I get is entering:
"This is 100% Correct"
and having it display back:
"This is 100orrect"
(stripping the % and following chars, interpreting an actual percent sign as an escaped sequence when the HTML is displayed in a TEXTAREA... (I can double the percent signs, but it will strip one the first time I edit the field and the second time display as above).
Also the obvious inability to code a TEXTAREA in a form.
Thanks again for posting.
It had some display problems, and I noticed [CTRL]+[INS] / [SHIFT]+[INS] did not work for copy / paste, (neither did [CTRL]+[C] / [CTRL]+[V]... standard shortcuts in most MS platform apps).
Hmmm, I don't have the problem. I can CTRL+C and CTRL+V to my hearts delight.
Some browsers disable this function in textareas due to security concerns.
I was recently looking at a couple of these and have kind of settled on FCKeditor so I'd be interested what your final choice will be.
Checked it out too... not bad, (no support for but IE under v.6.0)...
My needs are really simple, most of these are overkill.
If I could just do basic <B>, <I>, type tags, escaped chars and be able to edit a TEXTAREA input it would be great. I'll probably have to code it myself since I want it to be Perl and not be a module or other external type of routine, (I may need to use some JS but I can code that into the Perl script).
Thanks (everyone) for the feedback and suggestions.
I'll post when I find (or code) a __simple__ TEXTAREA replacement in Perl.
$content =~ s/\</</g;
$content =~ s/\>/>/g;
When you see the textarea tag in the editing text area box your browser the carats will resolve as < and > but if you view source you'll see < and >. You could even do something like this:
$content =~ s/\</\[/g;
$content =~ s/\>/\]/g;
and inform your end user that HTML needs to be coded with brackets, like on this forum and many others. Just don't forget to swap it back out when you output the content.
Sorry if this is off track, having a hard time gathering the real task from this thread.
rocknbil - thanks for the regex examples... I've got some in place, I guess I should be more explicit on what I'm trying to accomplish.
This is for part of a CMS that is being used to migrate 1000+ static pages into a manageable environment. The static pages were created using a combination of Dreamweaver and hand-coded HTML and nothing is consistent, so my best option seems to be manually cutting and pasting the HTML between the BODY tags from each page into a CMS database record, (header, footers, navigation, ads, etc.. are already accounted for in the CMS, now we need to get the "content" from the static pages into a particular DIV that the CMS sets up so all pages will follow the "template" (and make future site updates less painful).
The TEXTAREA replacement should be able to handle coding other TEXTAREA inputs without breaking the display. Text editted in the "replacement" should not be changed if same string is passed back via value= in subsequent FORM processing, (ie- encode, decode, encode again should not lose anything). I need to cut and paste into the TEXTAREA replacement without pre-editting, (I don't want to substitute [ for <, etc...)
This will be used by data entry people in the future who will only expect that if they enter plain text it will be displayed as text and if they enter HTML it will display as expected --- I don't want them to have to learn macros or substitutions, ie- @@red@@, [ tag ], etc..
I like to use Perl whenever possible, but if it's JS or other that can be coded in script, that's fine too.
The TEXTAREA replacement should be able to handle coding other TEXTAREA inputs without breaking the display. Text editted in the "replacement" should not be changed if same string is passed back via value= in subsequent FORM processing . . .Correct.
Someone calls up the contact form to edit, and when they submit it, it should store
<textarea>
Not
<textarea>
I've built a few some simple CMS's of my own (no miracle-warez by any stretch, but they work.) There's probably a better fix, but what I've done (like on this or many other message boards) is to sub out carats from your data completely for square brackets, and only return them to carats on final output or preview.
Store [textarea]
and display <textarea>
It's not free but it isn't expensive either at $40. Even has a spell checker option and some cross platform browser compatability.
I'm probably going to buy it. Unless... somone can point me to a free solution that has as good browser compatability as this one.
Uh oh... I just noticed that htmlArea only works with IE. Guess I won't be using it after all.
Actually this isn't true (though it definitely does seem to say so on the HTMLArea website for some reason). I've been using the HTMLArea-based editor extension for the Typo3 CMS in Firefox and quite liking it...
-B