As we have OOTB "Edit" functionality of SharePoint 2013. I want to assign this functionality to a custom button. How to achieve it.
You said you want to trigger the Edit page functionality from a custom button. I think that the code you have to call really depends on the page type (eg. webpartpage vs wiki page).
On a webpartpage, the
<a> tag id attribute of the ribbon edit page button reads:
Looking for this string inside the TEMPLATE\GLOBAL\XML\CMDUI.XML file, you'll see that the command actually called is
webPartPageStartEdit, which ultimately calls either
window.EnsureCheckoutAndChangeLayoutModeToEdit(this.$1.listId, this.$1.itemId, false); or
window.ChangeLayoutMode(false, false); depending on whether the force checkout setting is on or off on the pages library where the page being edited resides.