<div class="text-center mx-auto">
<button class="btn btn-success"
	onclick="saveText()"
	hx-post='{% if page %}/{{ page }}{% endif %}/edit/{{ bloc.name }}'
	hx-swap="outerHTML swap:100ms"
	hx-target="#{{ bloc.name }}" > Enregistrer </button>


</div>

<script>

	function saveText(){
		
		editor_content = document.getElementById("editor");
		result = document.getElementById("text");
		if (editor_content != null)
		{
			console.log(quill.root.innerHTML);
			result.innerHTML = quill.root.innerHTML;
  		
	
			delete quill;
		}
		enableModBtn();

	}
</script>
