Is it possible to automatically submit a tinymce form after a certain name of words written in the textarea field? I tried this but it doesn't work.
Here's my code:
<body>
<div class="container mt-5">
<form method="post" id="form" action="getform.php">
<div class="form-group">
<label>Title</label>
<input type="text" name="title" class="form-control">
</div>
<div class="form-group mt-4">
<label>Content</label>
<textarea name="dopamine" id="tinymce"></textarea>
</div>
<button class="btn btn-primary mt-4">Submit</button>
</form>
</div>
<script>
$('#tinymce').keyup(function(){
if(this.value.length ==10){
$('#Form').submit();
}
});
</script>
</body>