Help for creating very basic editor for music script

Hello,

I have developed a web music application where user can input music in the form of script using english language, then it converts it into Indian language & later user can play that music script, you can see my application in action here

http://vishwamohini.com/music/demo-notations.php

Here is basic example of my script
[melody start]
[S1R1G1m1|P1D1N1S2|S2N1D1P1|m1G1R1S1][lyrics]
[S1R1G1m1|P1D1N1S2|S2N1D1P1|m1G1R1S1][notations]
[melody end]

Currently I am using HTML textarea, but I want to replace it with codemirror for better user experience.
I just want to provide different style to script , I think this could be very basic usage of codemirror capabilities. I am not experienced javascript developer.

Can any body help me for this simplest configuration just to remove all unnecessary code in mode.