Hi. I'm currently developing a property editor, and I would like to import images via the deafult media picker. I simply can't make it run. I've tried using code from this tutorial and have so far failed to progress. The JS I'm struggling with looks like this:
angular.module("umbraco")
.controller("MotilloSlideshow",
function ($scope, assetsService, dialogService) {
$scope.addNewImage = function () {
var dialogImg = dialogService.mediaPicker({
scope: $scope,
callback: function (data) {
$(data.selection).each(function (i, item) {
var imagePropVal = imageHelper.getImagePropertyValue({ imageModel: item, scope: $scope });
callback(imagePropVal);
});
}
});
}
});
I'm unable to embed the deafult media picker.
Hi. I'm currently developing a property editor, and I would like to import images via the deafult media picker. I simply can't make it run. I've tried using code from this tutorial and have so far failed to progress. The JS I'm struggling with looks like this:
Any help would be greatly appreciated!
Regards,
Erik
Hi
To me this works. Is It imageHelper??
angular.module("umbraco").controller("editor", function ($scope, assetsService, dialogService, imageHelper) {$scope.insertImage = function (target) { dialogService.mediaPicker({ callback: function (data) { var imagePropVal = imageHelper.getImagePropertyValue({ imageModel: data, scope: $scope }) addImgElement(imagePropVal, target); } }); }is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.