JSFiddle - React, Tailwind, and code Playground
by Ali Uygur
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://cdn.quilljs.com/1.3.6/quill.snow.css" rel="stylesheet">
<script src="https://cdn.quilljs.com/1.3.6/quill.js"></script>
<title>Quill ile TextArea</title>
<style>
#quillTextArea {
min-height: 100px; /* Minimum yükseklik değerini belirleyin */
}
</style>
</head>
<body>
<textarea id="quillTextArea" style="display: none;"></textarea>
<div id="quillEditor"></div>
<script>
document.addEventListener("DOMContentLoaded", function () {
var quill = new Quill('#quillEditor', {
theme: 'snow',
placeholder: 'Buraya metin yazabilirsiniz...',
});
var quillTextArea = document.getElementById('quillTextArea');
quill.on('text-change', function () {
quillTextArea.value = quill.root.innerHTML;
quillTextArea.style.height = 'auto'; // Otomatik yüksekliği ayarla
quillTextArea.style.height = (quillTextArea.scrollHeight + 10) + 'px'; // Yüksekliği güncelle (10 piksel ekstra boşluk)
});
});
</script>
</body>
</html>