Cannot Change Edit Form Title

Cannot Change Edit Form Title

wblakencwblakenc Posts: 78Questions: 17Answers: 1

Hello,
I am attempting to dynamically change the edit form title using the following code however the title remains the same:

editor.on( 'initEdit', function (evt, node, data) {
        editor.title( function( e, dt) {    
             return 'Edit ';
        });
});

The goal will be to put the Asset name into the edit forms title however, I tried to just change the title from the default as a starting place. It is like the title is getting over written by something else. Any idea what I am doing wrong? I can post more code if needed.

Thanks in advance!

This question has accepted answers - jump to:

Answers

  • Tester2017Tester2017 Posts: 145Questions: 23Answers: 17
    edited August 2017

    wrong reaction I'm sorry, but I couldn't remove it.

  • Tester2017Tester2017 Posts: 145Questions: 23Answers: 17
    Answer ✓

    I don't your exact configuration, but I was trying some things and the below code is setting a title in the editor window. So maybe this might serve for you to as some kind of starting point.

            initComplete: function(settings, json) {
               editor.on( 'open', function () {
                   editor.title( function( e, dt) {   
                       return 'Edit ';
                   });
            } );
    
  • allanallan Posts: 63,471Questions: 1Answers: 10,467 Site admin
    Answer ✓

    Yes - use open instead as @Tester2107 says. The problem with using initEdit is that the title set there will be overwritten by the options set in the edit() call.

    Allan

  • wblakencwblakenc Posts: 78Questions: 17Answers: 1

    Thank @allan and @Tester2017. My issue was using the initEdit (as you stated).

    Thanks again.

This discussion has been closed.