500) {
$event.target.innerText = text.substring(0, 500);
const range = document.createRange();
const sel = window.getSelection();
range.selectNodeContents($event.target);
range.collapse(false);
sel.removeAllRanges();
sel.addRange(range);
}
formData.description = $event.target.innerText.substring(0, 500);
"
@keydown="
const text = $event.target.innerText;
const allowedKeys = ['Backspace','Delete','ArrowLeft','ArrowRight','ArrowUp','ArrowDown','Tab'];
if (text.length >= 500 && !allowedKeys.includes($event.key) && !($event.ctrlKey || $event.metaKey)) {
$event.preventDefault();
}
"
class="rich-editor w-full px-3 sm:px-4 py-2 sm:py-2.5 lg:py-3 text-sm outline-none"
placeholder="Describe the role, responsibilities, and requirements...">