Copied to clipboard

Flag this post as spam?

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


  • duanleou90 14 posts 65 karma points
    Jan 30, 2023 @ 11:16
    duanleou90
    0

    Can Not Create A Custom Property Editor In Umbraco 10

    Hi Everyone,

    I'm using Umbraco 10 and I want to create a property editor.

    So I followed the official document from Umbraco https://docs.umbraco.com/v/10.x-lts/umbraco-cms/tutorials/creating-a-property-editor.

    But I could not see my property editor was showed.

    Any addtional step to make it works ?

    Thanks!

  • Johannes Lantz 156 posts 839 karma points c-trib
    Jan 30, 2023 @ 21:47
    Johannes Lantz
    0

    Hi!

    Is it the step "Registering the Data Type in Umbraco" where the property editor is not showing? If that's the case it sounds like the package.manifest is not configured correctly. If you share your package.manifest we can double check it so it's configured correctly!

    //Johannes

  • duanleou90 14 posts 65 karma points
    Jan 31, 2023 @ 07:07
    duanleou90
    0

    Hi Johannes Lantz,

    Yes. In "Registering the Data Type in Umbraco" step. I can not see the new property editor.

    I just followed the document https://docs.umbraco.com/v/10.x-lts/umbraco-cms/tutorials/creating-a-property-editor#registering-the-data-type-in-umbraco.

    Below is my package.manifest

    {
        // we can define multiple editors
        "propertyEditors": [
            {
                /*this must be a unique alias*/
                "alias": "Suggestions editor",
                /*the name*/
                "name": "Suggestions",
                /*the icon*/
                "icon": "icon-list",
                /*grouping for "Select editor" dialog*/
                "group": "Common",
                /*the HTML file we will load for the editor*/
                "editor": {
                    "view": "~/App_Plugins/Suggestions/suggestion.html",
                    /*Optional: Add 'read-only' support. Available from Umbraco 10.2+*/
                    "supportsReadOnly": true
                }
            }
        ],
         // array of files we want to inject into the application on app_start
        "css": [
            "~/App_Plugins/Suggestions/suggestion.css"
        ],
        "javascript": [
            "~/App_Plugins/Suggestions/suggestion.controller.js"
        ]
    }
    

    And the folder structure

    enter image description here

  • vipin 13 posts 83 karma points
    Sep 07, 2023 @ 05:54
    vipin
    0

    Hi sir, how to add manifest file in visual studio 2022, please guide to add, am working on creating custom property editor

  • duanleou90 14 posts 65 karma points
    Sep 07, 2023 @ 07:31
    duanleou90
    0

    you can create a text file, for example package.txt and then rename it, change .txt to .manifest and then include it into VS

  • Johannes Lantz 156 posts 839 karma points c-trib
    Jan 31, 2023 @ 12:40
    Johannes Lantz
    100

    I think I spotted it! Try moving the App_Plugins folder up 1 directory! So Umbraco1023/wwwroot/App_Plugins/ should become Umbraco1023/App_Plugins/. That should do the trick!

    Let me know if that does it for you! :)

    //Johannes

  • duanleou90 14 posts 65 karma points
    Feb 01, 2023 @ 03:16
    duanleou90
    0

    Great! It works

    Thanks you so much

Please Sign in or register to post replies

Write your reply to:

Draft