Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • ThomasBrunbjerg 90 posts 182 karma points
    Aug 11, 2017 @ 07:30
    ThomasBrunbjerg
    0

    Using the MediaPicker property editor in custom property (Umbraco)

    I want to create a custom property editor, that makes use of the media picker. Right now my controller looks like this:

    angular.module("umbraco").controller("My.MediaCropperController", function($scope, dialogService) { $scope.mediaPicker = { view: 'mediapicker', value: null, // or your value config: { disableFolderSelect: true, onlyImages: true } }; });

    And my view looks like this:

    umb-editor ng-controller="My.MediaCropperController" model="mediaPicker" ng-if="mediaPicker">

    As I understand it, I need to create config object for built-in editors, then use in the template to show the editor. However when i bring my property editor into my backoffice, nothing is being shown. What am I doing wrong here?

    This is my package manifest file:

    {
    //you can define multiple editors
    propertyEditors: [
    { /this must be a unique alias/ alias: "My.MediaCropper", /the name/ name: "My Media Cropper", /the html file we will load for the editor/ editor: { view: "~/AppPlugins/MediaCropper/mediacropper.html" } } ] , //array of files we want to inject into the application on appstart javascript: [ '~/App_Plugins/MediaCropper/mediacropper.controller.js' ] }

Please Sign in or register to post replies

Write your reply to:

Draft