Redo the logic for initializing the editor button

Bug: 52058
Change-Id: I278a2f3b27e4796838c441107f0f34aa9f3871e5
Merge "Redo the logic for initializing the editor button"