integrate tiptap text editor

This commit is contained in:
bkfox
2024-04-30 18:29:34 +02:00
parent 55123c386d
commit 93fba2d46d
21 changed files with 327 additions and 149 deletions

View File

@ -2,6 +2,7 @@ import os
import inspect
from bleach import sanitizer
from django.conf import settings as d_settings
@ -179,5 +180,10 @@ class Settings(BaseSettings):
ALLOW_COMMENTS = True
"""Allow comments."""
# ---- bleach
ALLOWED_TAGS = [*sanitizer.ALLOWED_TAGS, "br", "p", "h3", "h4", "h5"]
ALLOWED_ATTRIBUTES = sanitizer.ALLOWED_ATTRIBUTES
ALLOWED_PROTOCOLS = sanitizer.ALLOWED_PROTOCOLS
settings = Settings("AIRCOX")