Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript jQuery typing detection

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #38314
    iancoates
    Member

    Hi,

    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

    Ian

    #103781
    iancoates
    Member

    oops acidentally bolded everything. Should be “everytime i type < b >…” without the spaces

    #103795
    karlpcrowley
    Participant

    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

    Here’s a list of editor available using JavaScript
    http://en.wikipedia.org/wiki/Comparison_of_JavaScript-based_source_code_editors

    I’ve never used any of them myself but I’ve heard Ace is the best
    http://ace.ajax.org/

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.