contenteditable realtime replace youtube url
- by pimz
so the problem is, i have a contenteditable div, with a keyup function binded.
everytime somebody puts a youtube url in it, it has to be replaced by an embedded movie.
i came up with a regex like this :
content.match(/http:\/\/\w{0,3}.?youtube+\.\w{2,3}\/watch\?v=.*?(?=\s)/g);
firefox wil do the replace after a whitespace, but in ie it won't work.
any suggestions?
thnx in advance!