Dark_Delphin,
 
<!DOCTYPE HTML>
<html>
<head>
  <title>Untitled</title>  <meta charset="utf-8">
</head>
<body> <textarea name="short_story" id="short_story" onfocus="setFieldName(this.name)" rows="15" class="f_textarea" >{short-story}</textarea>
<script>
	var video_id = 12345, video_frame = 'asdfg', video_title ='qwerty';
var final="<br/><div>"+video_frame+"</div><br/><div class='form-group'><label class='control-label col-lg-2'>Код видео:</label><div class='col-lg-10'><input onclick='select(this);' type='text' class='edit bk' style='width:350px;' value='[media=http://youtu.be/"+video_id+"]' readonly> <input type='button' onclick=\"document.getElementById('short_story').value = '"+video_title+"'\" value='Вставить'>  </div></div>";
	document.write(final)
</script>
</body>
</html>
всё работает!
 может перестать строкой формировать элементы?