I am looking for plug-in developers to help develop plug-ins for a project, please explain to me the basics of building a plug-in and interacting with users through the admin panel
Parsing posts and markdown plugin with auto-linking
-
@julian Yes, Plugin sanitizes HTML, if I use higher priority than markdown plugin.
Actually It's sanitizes HTML and changes http urls on anchor tags, - double punch
If I use lower priority, I have my replacement as href property of anchor tag
I would like to find friendly way, so my plugin will work well with
markdown
plugin...
And I don't like idea to extend my regular expressions to comply with anchor tags -
@Nicolas What I mean to say is... don't send HTML into Markdown plugin, it'll sanitise it, which is likely not intended.
If you need to do more than replace the url, then unfortunately, you will have to alter the HTML after-the-fact
However, I recently had to mess around with it, so... here's a handy dandy regex for you to re-appropriate
/<a.+?href="(.+?)".*?>(.*?)<\/a>/g
(matches all links) -
@julian I don't like this idea, and situation in overall.
Basically, It creates dependency in mine plugin to check if URLs were already changed, handle optional anchor tags, etc...
So, I will go with this:
- Disable Autoconvert for urls (Plugin's users will have to do the same)
- Use low priority
-
@BDHarrington7 -
GitHub - NicolasSiver/nodebb-plugin-ns-embed: Embed media and rich content in posts: YouTube, Vimeo, Twitch and more.
Embed media and rich content in posts: YouTube, Vimeo, Twitch and more. - GitHub - NicolasSiver/nodebb-plugin-ns-embed: Embed media and rich content in posts: YouTube, Vimeo, Twitch and more.
GitHub (github.com)
-
Ah, um, you might already know, but there are already at least 2 other plugins that do this that I remember, although I can't say for sure if they still work. I am pretty sure that the
GitHub - a5mith/nodebb-plugin-youtube-lite: Lazyloads Youtube Videos on your NodeBB Forum
Lazyloads Youtube Videos on your NodeBB Forum. Contribute to a5mith/nodebb-plugin-youtube-lite development by creating an account on GitHub.
GitHub (github.com)
-
I'm working with different URLs to change them on HTML, most complex replacements will be iframes.
I have plans to release this plugin with:
youtube
,twitch
,vimeo
,coub
andvine
embeds. -
@BDHarrington7 yes, I have checked them before I have started development