[nodebb-plugin-ns-embed] NS Embed


  • GNU/Linux

    @Nicolas tried numerous things in the markdown config, but the option to work would look to be

    Open external links in a new tab/window
    Tell web crawlers that external links are not to be followed

    EDIT: Disabling both of these reduces it to

    ">
    [embed works]
    /a>

    th@ would seem to be the one doing you would think, but has no effect

    also the twitter likes to have the javascript only after the blockquote. doesn't work in the custom header. doh, would you be able to strip it from adding it to content (between the <p></p>'s in ur plugin ?


  • Plugin & Theme Dev

    If it likes after, place it in the end of the page:

    <script ...
    </body>
    

  • GNU/Linux

    @Nicolas said:

    If it likes after, place it in the end of the page:

    <script ...
    </body>
    

    <script>
    require(['forum/footer']);
    </script>
    <script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
    </body>
    </html>

    unbelievably that updates all of the tweet embeds now without putting it in the embed replace code

    but still the same issues with it putting html in the post as content between the <p></p>'s
    post looks like:

    ">
    [embed]
    /a>

    not sure what's happenning


  • GNU/Linux

    ok, well placing the javascript @ the end before </body> has bad effect because the post doesn't update after hitting [Submit] button. Basically updates after you push a page reload. So my conclusion is that the javascript code is fine added to the replace code , it seems to work perfectly.

    There is still the same issue with it adding html as content around the embed, somehow it does this and I don't remember actually that it had this problem around nodebb version 0.6.0/0.7.0 ...

    So I'll just leave you with this pic to show progress:
    0_1450846824849_embed.jpg


  • Plugin & Theme Dev

    Version 2.0.0 Final

    New version is available. Summary: important one, plugin doesn't create any restrictions anymore. Auto-linking restriction is removed. Even more interesting fact - you can use plugin with Markdown plugin or without. It means, plugin should work in most cases.

    • Important: compatibility with Markdown plugin
    • Compatibility with content plugins
    • Best practice for ACP scripts
    • Update all dependencies

    P.S.
    "Final" means - my TODO list is empty for this plugin. I will do patches if needed, for now, I will concentrate on another plugins.


  • Plugin & Theme Dev

    Version 2.0.1

    New version is available. Improved parsing of Youtube Urls, now it ignores links to Youtube profiles.
    Don't forget to delete your current Youtube rule and install a new one (just click on Install Default Rules - It will install only missing rules, it will not override any rules which are currently in use)



  • Hi.

    I'm currently using your plugin and it really works like a charm in order to extend the Markdown syntax, thank you.
    However, I have a little issue with my code section. Can your plugin ignore <pre> and <code> tags ?

    Thank you for getting your attention.


  • Plugin & Theme Dev

    Core functionality of the plugin is Regular Expressions. If you need to ignore some particular tag, or something, you can handle it via your regular expression.


  • Plugin & Theme Dev

    Version 2.1.0

    A new version is available. Twitch rules are unlocked.

    Changelog:

    • Add Twitch Default rule for Live content
    • Add Twitch Default rule for VoD

  • Plugin & Theme Dev

    Here is an example how Live embed for Twitch with disabled auto-play:

    2.1.0 Twitch Live Preview



  • Is there any examples of how of the 'watch' and "replace" for embedded videos? I am trying to get uploaded videos embedded but I can't seem to get the proper regex or new replacement code to get it to work.

    Do you regex on the markdown code, or the url? What is the replacement code?



  • For anyone who was having the same issues as me, I found my answer here:
    https://github.com/NicolasSiver/nodebb-plugin-ns-embed/issues/7



  • Hi code for dailymotion vidéo 😉

    (?:<a.*?)?(?:https?:\/\/)?(?:www\.)?dailymotion\.com\/video\/([a-zA-Z0-9_-]{4,7})(?:.*?\/a>)?
    
    <div class='embed-wrapper'><div class='embed-container'><iframe  src="//www.dailymotion.com/embed/video/$1" frameborder="0" allowfullscreen></iframe></div></div>
    



Looks like your connection to NodeBB was lost, please wait while we try to reconnect.