Thanks for the link! I think I'll add that kind of functionality to my CKEditor mod for Vanilla 2.0. Making an oEmbed provider out of Vanilla would be fun too, and useful as a way to use the same oEmbed code to create smart links for Vanilla forum threads, etc.
Yes, and I was surprised CKEditor and other such editors don't already have an oEmbed-style plugin already. It's so useful to create links and such that people want to click, just by copying and pasting what's in your address bar!
Thanks for the sample, @ZeFish -- I expect I'll mostly be writing JavaScript (or CoffeeScript) for the interactions with CKEditor, with associated styles & such. I'm still torn as to how to do this--should it be an auto-insert (and HTML generation, for easy editing later?), or should it be along the side as an "In this post" kind of list? Should I treat making a link (as text) the same way I would treat pasting in a URL?
Any thoughts? (And thanks @[-Stash-] for the backport, as I said, there probably won't be much PHP related to Vanilla so it should be an easy port.)
Okay, maybe this'll be even easier than I thought. It does need some PHP to allow for YouTube embedding though even there perhaps I could use JavaScript to convert a YouTube image preview into an embedded video.
Well, using jQuery-oembed's code, I managed to make a proof-of-concept CKEditor plugin, but having it replace the pasted or typed URL (after you hit space) with the embedded video or clip from wikipedia is more than a little odd. I now see why Facebook and others ensure the new bit is listed outside your text box. If anything, what I suppose I would want is another textbox to appear *after* the embedded content, so I can keep typing afterward and chain them all together.
Here's my current code (not yet added to my github project due to lack of time atm):
Comments
- Spam
- Abuse
0 · Insightful Awesome LOL ·- Spam
- Abuse
0 · Insightful Awesome LOL ·- Spam
- Abuse
0 · Insightful Awesome LOL ·http://pastie.textmate.org/841517
- Spam
- Abuse
0 · Insightful Awesome LOL ·- Spam
- Abuse
0 · Insightful Awesome LOL ·Any thoughts? (And thanks @[-Stash-] for the backport, as I said, there probably won't be much PHP related to Vanilla so it should be an easy port.)
- Spam
- Abuse
0 · Insightful Awesome LOL ·- Spam
- Abuse
0 · Insightful Awesome LOL ·- Spam
- Abuse
0 · Insightful Awesome LOL ·Oh look: http://code.google.com/p/jquery-oembed/
Okay, maybe this'll be even easier than I thought. It does need some PHP to allow for YouTube embedding though even there perhaps I could use JavaScript to convert a YouTube image preview into an embedded video.
- Spam
- Abuse
0 · Insightful Awesome LOL ·Here's my current code (not yet added to my github project due to lack of time atm):
http://gist.github.com/317936
- Spam
- Abuse
0 · Insightful Awesome LOL ·- Spam
- Abuse
0 · Insightful Awesome LOL ·Vanilla Forums Senior Developer [GitHub, Twitter, About.me]
- Spam
- Abuse
0 · Insightful Awesome LOL ·