novicell / novicell.umbraco.oembed Goto Github PK
View Code? Open in Web Editor NEWA property editor for Umbraco 9+ for embedding video or images. Using OEmbed to fetch data from external sources.
A property editor for Umbraco 9+ for embedding video or images. Using OEmbed to fetch data from external sources.
Currently various angular functions are used here:
https://github.com/Novicell/Novicell.Umbraco.OEmbed/blob/main/src/Novicell.Umbraco.OEmbed/App_Plugins/Novicell.OEmbed/oembed.js
However in newer versions of Umbraco v8 and v9 we have some static functions available via Utilities
, which mostly are identical with the angular functions and just wrapping these:
https://github.com/umbraco/Umbraco-CMS/blob/v8/contrib/src/Umbraco.Web.UI.Client/src/utilities.js
It noticed a traditional checkbox currently is used here: https://github.com/Novicell/Novicell.Umbraco.OEmbed/blob/main/src/Novicell.Umbraco.OEmbed/App_Plugins/Novicell.OEmbed/oembed.editor.html#L39
It can use <umb-checkbox>
or <umb-toggle>
component instead. In this case it would probably use a toggle as it is a setting.
In Umbraco core: https://github.com/umbraco/Umbraco-CMS/blob/v8/contrib/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/embed/embed.html#L48
I notice the use of Html.Raw ... could the Html property perhaps return an HtmlString instead,? That way the property can be rendered "straight up".
EDIT: this is not the place for such a comment. Sorry. My mistake! But now it's here - should it stay or should it go?
Originally posted by @jannikanker in #10 (comment)
I noticed these "buttons" using anchor elements, but should Really use <button type="button">
instead to be accessible: https://github.com/Novicell/Novicell.Umbraco.OEmbed/blob/main/src/Novicell.Umbraco.OEmbed/App_Plugins/Novicell.OEmbed/oembed.propertyeditor.html#L9-L14
The same is valid for this button, which then doesn't need prevent-default
directive:
https://github.com/Novicell/Novicell.Umbraco.OEmbed/blob/main/src/Novicell.Umbraco.OEmbed/App_Plugins/Novicell.OEmbed/oembed.propertyeditor.html#L19-L21
Example from Umbraco core:
https://github.com/umbraco/Umbraco-CMS/blob/v8/contrib/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/multivalues.html#L17
Core package is needed for a solution with multiple projects. Otherwice it creates in every project a app_plugin folder that is not really needed
With the new release candidate inserting vimeo url results in error
Method not found: 'System.String Umbraco.Extensions.LocalizedTextServiceExtensions.Localize(Umbraco.Cms.Core.Services.ILocalizedTextService, System.String, System.String,
Add information in the release notes, on the new package being pushed
I noticed the code is using <novicell-oembed-preview />
which will cause issues in newer versions of Angular, mainly with any following sibling elements.
https://github.com/Novicell/Novicell.Umbraco.OEmbed/blob/main/src/Novicell.Umbraco.OEmbed/App_Plugins/Novicell.OEmbed/oembed.editor.html#L24
So it should be similar to web comments using a end-closing tag, e.g. <novicell-oembed-preview></novicell-oembed-preview>
.
Actually only a limited set og HTML elements should be self-closed like br, hr, img, input, etc.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.