How to get block id on block add & edit form?

Blocks are plugin in Drupal-8, I need to add a form element in the block add form & all the block edit forms.
I am able to add the new form element in the form by form alter. But i need to get the block id on submit(custom submit handler). For block add forms block id has to be new block created & for block edit form, the existing block id.

How can i get the block id?


Go to Source of this post
Author Of this post: neha
Title Of post: How to get block id on block add & edit form?
Author Link: {authorlink}