Edit in JSFiddle

<form>
<div class="form-group">
			<label for="html">Insert HTML code</label>
			<div id="editor" style="width: 100%; height: 200px">ace editor running...</div>
			<input type="hidden" id="html" name="html" value=""/>
		</div>

		<div class="form-group text-center">
			<button type="submit" class="btn btn-primary btn-lg">Save</button>
		</div>
</form>

<script src="//cdnjs.cloudflare.com/ajax/libs/ace/1.2.5/ace.js"></script>
  var editor = ace.edit('editor');
  editor.setTheme("ace/theme/monokai");
  editor.session.setMode("ace/mode/html");
  $('#invoice-edit-form').submit(function () {
    $('#html').val(editor.getSession().getValue());
  });
@import url("https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css");

form { margin:20px auto;max-width:560px;}