Posted: 31 May 2013, 20:30
Embed YouTube video
I've just added support for a new BBCode to embed Youtube video directly in the post.
This works this way (the video ID is the 11 chars that can usually be found after "watch?v=" in the video URL, for example u67CWFvl5Qk):
Using the full URL is also supported (not officially though):
(It just makes it easier to copy-paste the URL in case javascript in not supported by the browser...)
Here's an example:
[youtube]u67CWFvl5Qk[/youtube]
There's even a new YouTube button to insert the tags when editing a post.
BBCode insertion fix:
I've also added a fix (at least for Firefox) so that the BBCode tags are properly inserted at the cursor position instead of the end of the post. If some text is already selected, it will be properly placed between the opening and closing tags.
xIMG ?
I was wondering about xIMG but I'm not sure there's really a point using it...
Note that all of that only work if javascript is enabled (most users don't care, but there could be NoScript users).
I've just added support for a new BBCode to embed Youtube video directly in the post.
This works this way (the video ID is the 11 chars that can usually be found after "watch?v=" in the video URL, for example u67CWFvl5Qk):
Code: Select all
[youtube]video ID[/youtube]
Code: Select all
[youtube]http://www.youtube.com/watch?v=u67CWFvl5Qk[/youtube]
Here's an example:
[youtube]u67CWFvl5Qk[/youtube]
There's even a new YouTube button to insert the tags when editing a post.
BBCode insertion fix:
I've also added a fix (at least for Firefox) so that the BBCode tags are properly inserted at the cursor position instead of the end of the post. If some text is already selected, it will be properly placed between the opening and closing tags.
xIMG ?
I was wondering about xIMG but I'm not sure there's really a point using it...
Note that all of that only work if javascript is enabled (most users don't care, but there could be NoScript users).