You may want to add a <script> tag to the HTML code you want to insert, such as when inserting a "module" for the end user etc. The simplest way around this is to break the '<script>' and '</script>' text into pieces. Don't forget to also escape any quotes. For example:
myVar = '<'+'script>alert(\'x\')<' + '/script>';
Then simply call the function as per normal:
<input type="button" value="lock Page" onClick="javascript:myDevEditControl.writeHTMLContent(myVar)">