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.

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

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
Community showcase
Posted in United States

One week from next event!

We're having breakfast next Monday at 8AM.  We'd love to see you all come out!  Details and RSVP can be found at:   https://aug.atlassian.com/events/details/atlassian-boise-present...

10 views 0 0
View post

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