Flickr module provides a filter for inserting photos and photosets into your content. This Flickr button here provides an UI for inserting Flickr filter syntax.
Note that, you must enable flickr filter for your content's input format in order to see the photos.
js:
var form = [
{name: 'type', type: 'select', options: {'flickr-photo': 'Photo', 'flickr-photoset': 'Photo set'}},
{name: 'id', required: 1},
{name: 'size', type: 'select', options: {s: 'Square', t: 'Thumbnail', m: 'Small', '-': 'Medium', b: 'Large', o: 'Original'}}
];
E.tagDialog('flickr', form, {title: 'Insert Flickr Photo', submit: function(tag, form) {
var el = form.elements;
E.replaceSelection('[' + el[0].value + ':id=' + el[1].value + ',size=' + el[2].value + ']', 'end');
}});