I want to extend the Widget Connector so that when a url of our video site is inserted in Confluence, it should be recognized and embedded.
I have followed this tutorial https://studio.plugins.atlassian.com/wiki/display/WC/Extending+the+Widget+Connector
But for some reason, the Confluence editor is not recognizing our url. And my WidgetRender implementation never get called.
It recognizes the youtube urls.
Is there anything I am missing? Any alternative documentation on Widget Connector?
Community moderators have prevented the ability to post new answers.
If anyone interested now: As an alternative you can use the autoconvert feature of the editor. It's javscript-based and relaces any links by text or a macro.
https://developer.atlassian.com/display/CONFDEV/Extending+Autoconvert
This example replace "anydomain.com" links by the "any-macro" macro:
(function() { AJS.bind("init.rte", function() { var pasteHandler = function(uri, node, done) { if (uri.host = "anydomain.com") { var macro = { name : 'any-macro', params : { id : paramExtractedFromUrl } }; tinymce.plugins.Autoconvert.convertMacroToDom(macro, done, done); } } }; tinymce.plugins.Autoconvert.autoConvert.addHandler(pasteHandler); }); })();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.