Click to See Complete Forum and Search --> : Call for block editable textarea


bubblenut
06-29-2005, 07:35 PM
I've come across the situation a number of times where I would like to be able to use block editing in a texarea. I know textarea selection areas aren't supported in sefari but who gives a t*ss about those dodgy mac monkeys?
/me ducks for cover ;)
I was wondering if anyone knows if block editing would be possible in textareas, I've done a bit of work with textarea selections but as far as I can see this would require multiple, part line selections in a texarea (something which I'm pretty sure isn't supported in any browser). Anyone else got any other ideas?

bradgrafelman
06-29-2005, 08:03 PM
Ok, I must be really stupid. What exactly is a 'block editable textarea' ?

bubblenut
06-29-2005, 08:10 PM
Block editing is the ability to edit, delete, insert text in a text editor with referece to verticle blocks as apose to lines. For example assume you have the follwing text.

<ul>
<li>Something</li>
<li>Something more</li>
<li>Another something</li>
</ul>

and you wanted to add a class to all three li tags (I know this is abit of a contrived example as you could just as easily add a class to the ul), ordinarily you'd have to add it to the first one and then copy and paste it into each other. Block editing allows you to select down vertically and then insert the same text on all the lines simultaneously(sp?). This can also be done for deleting, cutting, pasting etc. Although it doesn't sound like much once you get used to it you can't live without it.

bradgrafelman
06-29-2005, 08:17 PM
Still a bit confused... so like if you typed this:

$text = 'Hello world!';

echo $text;

"Block editable textarea" would allow you to highlight that, and click the PHP tag, and it would wrap the code in the tags for you?

I don't see any other applicable use on this board, or else I'm not getting the point (very likely :p)

bubblenut
06-29-2005, 08:25 PM
No, given the folwing code, block editing would allow me to delete the "notneeded" on every line in one go leaving me with the code in block two.
Before:

$notneededvar1 = 'ksad';
$notneededvar2 = 'skada';
$notneededvar3 = 'kalsd';

After:

$var1 = 'ksad';
$var2 = 'skada';
$var3 = 'kalsd';

I've selected a "block" of text three lines high and 9 characters wide and deleted it in one go.

bradgrafelman
06-29-2005, 08:29 PM
Ah, I see.

This is why I do all of my posts in Notepad2 (http://www.flos-freeware.ch/notepad2.html) and copy/paste them when I'm done! :p

planetsim
06-29-2005, 09:39 PM
bubblenut your not talking about what vB v3 has as there new flashy editor if so its actually an Iframe which no it doesnt work in Safari, i dont think it works in Opera either. Anyway to show an example of what Im talking about http://www.mozilla.org/editor/midasdemo/

vaaaska
06-30-2005, 04:28 AM
I'm going on a Safari to your home town - watch out! ;)

The other day I was trying to come up with a javascript for producing tabs in a textarea...once again, can't do it in Safari.

But there is hope...with contenteditable finally here for Safari people are trying to make these things work:

http://www.xs4all.nl/~hhijdra/stefan/ContentEditable.html