NuGet Packages | Version |
---|---|
Release | |
Pre-release |
Umbraco Packages | |
---|---|
Release | |
Pre-release |
Download and install the package from : http://our.umbraco.org/projects/backoffice-extensions/oembed-picker-property-editor
Install-Package Dawoe.OEmbedPickerPropertyEditor
If you only need the binaries you can install
Install-Package Dawoe.OEmbedPickerPropertyEditor.Core
- In Umbraco create a datatype and choose OEmbed Picker as your property editor
- If you want to allow embedding of multiple items check the box "Allow Multiple"
- Add a property to your documenttype using the newly created datatype
The package comes with a property value convertor for easy use in your views. The property editor returns a object containing the following properties
- Url : The url of the embedded item
- EmbedCode : the embed code
- Width : the width set by the editor
- Height : the height set by the editor
For a single embed :
@using Dawoe.OEmbedPickerPropertyEditor.Core.Models;
@Model.Value<OEmbedItem>("propalias").EmbedCode
For multiple embeds :
@using Dawoe.OEmbedPickerPropertyEditor.Core.Models;
@foreach(var item in Model.Value<IEnumerable<OEmbedItem>>("propalias"))
{
<div>@item.EmbedCode</div>
}
When you only need the source url of the iframe in the embed code you can do the following
@using Dawoe.OEmbedPickerPropertyEditor.Core.Models
@using Dawoe.OEmbedPickerPropertyEditor.Core.Extensions
@Model.Value<OEmbedItem>("propAlias").GetEmbedSrc()
- Support for Umbraco 12
- Fixes (#31)
- Better Delivery API support
- Support for Umbraco 12
- Support for Umbraco 11
- Support for Umbraco 10
- Converted UI project to razor class library
- Breaking change : Moved classes in Dawoe.OEmbedPropertyEditor namespace to Dawoe.OEmbedPropertyEditor.Core namespace.
- Fix for deserializing property value when editor was a different property editor previously. Thanks to @bjarnef for the PR (#23)
- Added extension method to solve issues like (#20)
- Support for Umbraco V9
- Fixes #17
- Add "edit" functionality to your embeds thanks to @bjarnef (#15)
- Make compatible with Umbraco 8.1.0 and up
- V8 support
- Different return type from value converter
- Macro Parameter editor support
- Better support for modelsbuilder. It now returns IHtmlstring or IEnumerable instead of object when generating models. This is can be a potentially breaking changes because the models will be generated differently.
- Fix typo
- Fix issue #3: Mandatory field not working
- Fix issue #2: Property editor doesn't work when used inside Leblender editor
- Remove serving of clientside resources through handler. Now files are extracted on first run after installing.
- Fix issue #1: Conflict with nuPickers
- Initial release
The repository only contains the package code and not test website. However a test site can be set up by running the script SetupTestSite.ps1 from the Utilities folder.
For starting the test site you can run StartTestSite.ps1
To deploy new changes made in the source code you can run UpdateTestSite.ps1.
Feel free to contact me on twitter : @dawoe21