I would like to be able to create a bend type in xhtml textarea using Javascript / jQuery. For example, given the following text:
ABC [123] DEF
I would like [123] shrink to [] when the cursor is not above it — that is, for cursor | :
ABC [] DEF| AB|C [] DEF ABC [|123] DEF ABC [12|3] DEF
I want the contents in curly brackets to be preserved, of course, when the element is complex (i.e. when the cursor leaves the curly brackets) and restored when it is added (the cursor goes inside the curly brackets).
I would be very grateful for the thought of this.
Thanks.
Brian
source share