The forums ran from 2008-2020 and are now closed and viewable here as an archive.
I’m looking for some jquery code. What I want to achieve is when I’m typing in a textarea and I type
I want it to automatically add the closing tag. Ideally this would work for any tag.
I’m sorry not to have any code to start with but al my searches have drawn a blank and I’m not too hot with jquery. Anyway, thanks for any help
oops acidentally bolded everything. Should be “everytime i type < b >…” without the spaces
Fixed up for ya
I wouldn’t recommend starting from scratch with this, it would involve writing a regular expression for every type of html element which somehow ignores any attributes, I’m sure there’s plenty out there
I’ve never used any of them myself but I’ve heard Ace is the best