Заменяет текстовые ссылки на медиа ресурсы определенных сайтов на их конечное представление.
Заменяет текстовые ссылки на медиа ресурсы определенных сайтов на их конечное представление используя формат oEmbed.
Просто добавьте отдельной строкой URL одного из поддерживаемых сайтов (провайдеров контента) на страницу, тему форума или комментарий и система заменит эту ссылку на блок с медиа контентом на который эта ссылка ссылается.
Пример
Указываете ссылку (обязательно в отдельной строке) на видео с Ютуба. И после сохранения наблюдаете вставленное в содержимое видео.
Для вставки ресурса внутри абзаца с текстом используйте BBCode [embed]ссылка[/embed]:
Пример
Lorem ipsum dolor [embed]https://www.youtube.com/watch?v=vx50HspXtWA[/embed] sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
При вставке через BBCode возможно так же задать высоту и ширину блока через атрибуты:
Пример
[embed width="200" height="200"]ссылка[/embed]
Плагин выложен на GitHub.
!Note: Чуть более расширинную документацию (на английском языке) можно найти на ГитХабе.
So, you add an url to a youtube video in a post or page and this plugin will automatically make it an embedded video?
Same with images? All you need is to put the url to an image in a post/page and this gets changed to an embedded image automatically?
But, I do not userstand why one time you can just add the link and the other time you need to use the embed bbcode.
Or maybe I am just dumb but can you shine some light on that? I read the oEmbed page but I am still a bit confused.
You are correct.
If you put a URL on it's own line, it automatically gets embeded. URLs do not automatically produce embeded content unless they are on their own line.
If you wrap the URL in the BBCode, you can embed content inside paragraphs, and well basically anywhere. These can be on their own line or not.
If you didn't wrap the URL in a BBCode and the URL is inside a line of text, it won't get embeded. The reason for the BBCode is to not embed URLs in text bodies that weren't originally intended, that may also produce wierd looking posts. The BBCode also allows you to use height and width attributes.
Ahh, now I get. Yes that is very nice. Thanks for taking the time to explain some more :)
Всего: 5, на странице: 5
Поблагодарили: 74 раза
Nice one!