Custom Property Editor with Block List Configuration
m
I’m currently making a property editor (JSON type) that holds a media object, and a block list (configuration and content). I managed to get all of this working EXCEPT the data entered into the block list editor isn’t retained. So my block list is configured correctly—I can click add content, it shows me the appropriate content options (my config is right) but when I save the block, the block data disappears. It’s got to be something really simple. I followed the Umbraco docs as closely as I could but there is a warning at the top that this particular page is under review. ----------------------------------------------------------------------------------- Screenshots: 1. Click Add Hotspot 2. Fill in data for the Hotspot 3. See a new entry in the blocklist.... 5. But data lost! ----------------------------------------------------------------------------------- I referenced these instructions to learn how to build the blocklist config. I'm then passing the model to the config portion works (what blocks are allowed) but the data I enter into each new block is not retained. - https://docs.umbraco.com/umbraco-cms/extending/property-editors/build-a-block-editor https://cdn.discordapp.com/attachments/1222231956893335552/1222295118929985639/image.png?ex=6615b209&is=66033d09&hm=e7dd26811e322c662f02abcf73595ce26f48a94829a1c96bc1acab94ec2a6d63& https://cdn.discordapp.com/attachments/1222231956893335552/1222295119751938078/image.png?ex=6615b209&is=66033d09&hm=b1565ed3e2b8d5f2d1797bfde335753b50256f213827200439c06b1752372f64& https://cdn.discordapp.com/attachments/1222231956893335552/1222295120179892435/image.png?ex=6615b209&is=66033d09&hm=189747362988be09d98f2557ab18151416415db203c3081adf60c11bbd9b78f8& https://cdn.discordapp.com/attachments/1222231956893335552/1222295120557117500/image.png?ex=6615b209&is=66033d09&hm=a07ead82bdec4c255ba9fa6d9cfc18ea22386a24ba50625e866740f85de971e8&
Copy code
/*
    * Block List Model
    * */
    vm.blockEditorModel = blockEditorService.createModelObject(
        vm.model.value.content, 
        vm.model.editor, 
        vm.model.config.blocks, 
        vm,
        vm);

    vm.blockEditorModel.config = {
        blocks: vm.model.config.blocks,
        useSingleBlockMode: false,
        multiple: true,
        validationLimit: { min: null, max: null },
        useInlineEditingAsDefault: false
    };
I use this and pass
blockEditorModel
into the . Content I type into any block isn't retained (even before saving the content and reloading it).
11 Views