It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Widget Connector extension not working.

sm shamim Aug 15, 2012

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?

1 answer

1 vote
Mirko Skramusky Feb 19, 2013

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);
    });
})();

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase

Friday Fun: What's your best vacation planning hack?

Let's face it, work can be challenging but fulfilling, especially when you enjoy the challenges thrown at you.  However for me, nothing compares to going on vacation (or holiday as some of you m...

541 views 26 4
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you