GithubHelp home page GithubHelp logo

novicell / novicell.umbraco.oembed Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 4.0 838 KB

A property editor for Umbraco 9+ for embedding video or images. Using OEmbed to fetch data from external sources.

C# 64.71% CSS 1.20% HTML 23.31% JavaScript 10.78%
oembed property-editor umbraco umbraco-package umbraco-property-editor umbraco-v10 umbraco-v9

novicell.umbraco.oembed's People

Contributors

soreng avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

novicell.umbraco.oembed's Issues

Use Utilities in favour of angular function

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

Use toggle instead of checkbox

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

Use button elements

Component shouldn't be self-closing

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.