i am new to JavaScript. i was just making a form with textarea which should have support of markdown but don’t know how to change selected text of textarea of into markdown format.
below is a pen in which, when clicking on bold button after selecting text in textarea then text should be change in bold of markdown format.