Copied to clipboard

Flag this post as spam?

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


  • Ant 8 posts 78 karma points
    Jan 25, 2021 @ 04:35
    Ant
    0

    editorService.contentEditor saveAndPublish hook

    I can see in the API documentation that you can specify allowPublishAndClose in the options for editorService.contentEditor. Without this you cannot make use of the submit function in the object.

    I'd prefer to just hook into the event when Save and Publish is clicked, but I can't seem to do that. So if I enable the Publish and close button, can I hide the Save and Publish button?

    Or is there a way to hook into when Save and Publish is clicked?

    Here is the object I'm passing into editorService.contentEditor:

    {
        create: true,
        submit: function (model) {
            courseMaterialService.fetchCourseMaterial(vm.CourseId);
            editorService.close(); 
        },
        close: function () { 
            editorService.close(); 
        },
        parentId: vm.CourseId,
        documentTypeAlias: courseMaterialTypeAlias,
        allowSaveAndClose: true,
        allowPublishAndClose: true
    }
    
Please Sign in or register to post replies

Write your reply to:

Draft