Copied to clipboard

Flag this post as spam?

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


  • James 10 posts 101 karma points
    1 week ago
    James
    0

    Opening Infinity Editor with Angular

    Is there a way in Umbraco 8 to open an infinity editor with angular to edit a page?

    I've tried this:

     var options = {
            title: "My custom infinite editor",
            view: "/umbraco#/content/content/edit/1063",
            submit: function (model) {
                editorService.close();
            },
            close: function () {
                editorService.close();
            }
        };
        editorService.open(options); 
    

    but it just opens a blank blade.

    Thanks.

    James R.

  • Søren Gregersen 283 posts 1140 karma points MVP c-trib
    1 week ago
    Søren Gregersen
    100

    Hi,

    From reading the code comments (https://github.com/umbraco/Umbraco-CMS/blob/3bf5160895a2b551929f1830a9e40bc5b1fe1801/src/Umbraco.Web.UI.Client/src/common/services/editor.service.js#L330), I get this:

    var options = {
        id: "content-id",
        submit: function(){ /* submit function */ },
        close: function(){ /* close function */ },
    };
    editorService.contentEditor(options);
    

    An examle can be found in contentpicker (https://github.com/umbraco/Umbraco-CMS/blob/c6467b355d6a5c0b10e2c79efbef8029d9cfac23/src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.controller.js#L288)

    hth :)

  • James 10 posts 101 karma points
    1 week ago
    James
    0

    Wow that works and its super cool!

    Thanks man!

Please Sign in or register to post replies

Write your reply to:

Draft