"""
Formularios del foro con el editor enriquecido CKEditor 5 (el mismo que usa el
resto de NovaWoW). El HTML resultante se sanea con nh3 al guardar (ver views).
"""

from django import forms
from django_ckeditor_5.widgets import CKEditor5Widget


class TopicForm(forms.Form):
    name = forms.CharField(
        max_length=45,
        widget=forms.TextInput(attrs={'placeholder': 'Título del tema', 'maxlength': 45}),
    )
    text = forms.CharField(widget=CKEditor5Widget(config_name='default'))


class ReplyForm(forms.Form):
    text = forms.CharField(widget=CKEditor5Widget(config_name='default'))


class EditPostForm(forms.Form):
    text = forms.CharField(widget=CKEditor5Widget(config_name='default'))
