A
amirkargerweb
I want to do this:
<textarea>
perl
<font color="FF0000">
$thing_to_get=17;
</font>
More Perl code using $thing_to_get
</textarea>
But the above doesn't work, of course.
The idea is that I'm giving the users a bunch of text where they might
want to edit the red parts. Then I'll have a javascript button to
select all. A user modifies the variable, clicks on the "select all"
button, and then pastes the code into a Unix window (then presses
Ctrl-D to run the script).
I don't want a WYSIWYG editor, I don't even need the user to be able to
decide which text to make red. All I want is to be able to set a piece
of the textarea to be red in the firstplace.
Reading here & in various javascript script archives, it seems like I
need to do fancy IE/Mozilla-specific contentEditable stuff. Is there a
simpler way to handle it?
Thanks,
-Amir Karger
<textarea>
perl
<font color="FF0000">
$thing_to_get=17;
</font>
More Perl code using $thing_to_get
</textarea>
But the above doesn't work, of course.
The idea is that I'm giving the users a bunch of text where they might
want to edit the red parts. Then I'll have a javascript button to
select all. A user modifies the variable, clicks on the "select all"
button, and then pastes the code into a Unix window (then presses
Ctrl-D to run the script).
I don't want a WYSIWYG editor, I don't even need the user to be able to
decide which text to make red. All I want is to be able to set a piece
of the textarea to be red in the firstplace.
Reading here & in various javascript script archives, it seems like I
need to do fancy IE/Mozilla-specific contentEditable stuff. Is there a
simpler way to handle it?
Thanks,
-Amir Karger