feat(admin): rich text editor for blog content (TipTap)
CI/CD / CI · API (dotnet build + test) (push) Successful in 3m33s
CI/CD / CI · Admin API (dotnet build) (push) Failing after 3m18s
CI/CD / CI · Dashboard (tsc) (push) Successful in 1m6s
CI/CD / CI · Admin Web (tsc) (push) Failing after 3m43s
CI/CD / CI · Website (tsc) (push) Successful in 46s
CI/CD / CI · Koja (tsc) (push) Successful in 49s
CI/CD / Deploy · all services (push) Has been skipped

Blog post bodies were plain <textarea>s labelled "Markdown". Replace with a
TipTap rich editor (bold/italic/strike, H1–H3, lists, blockquote, code, links,
undo/redo), RTL-aware, producing HTML.

- New RichTextEditor component (TipTap v2: react + starter-kit + pm + link +
  placeholder), immediatelyRender:false for Next SSR, self-contained content
  styling, external-value sync.
- Wired into the FA/EN content fields of the blog editor; labels no longer say
  "Markdown" (fa/en/ar).
- Website blog page now renders HTML when the body is HTML and falls back to
  MDXRemote for older Markdown posts (backward-compatible). Content is authored
  only by trusted SystemAdmins, so HTML is stored/rendered directly.

Admin build + website typecheck clean.
This commit is contained in:
soroush.asadi
2026-06-02 22:25:47 +03:30
parent 97a9481627
commit f1756b491e
8 changed files with 998 additions and 23 deletions
+20 -7
View File
@@ -1055,8 +1055,8 @@
"fieldExcerptEn": "الملخص بالإنجليزية",
"fieldCategoryFa": "الفئة بالفارسية",
"fieldCategoryEn": "الفئة بالإنجليزية",
"fieldContentFa": "المحتوى بالفارسية (Markdown)",
"fieldContentEn": "المحتوى بالإنجليزية (Markdown)",
"fieldContentFa": "المحتوى (فارسي)",
"fieldContentEn": "المحتوى (إنجليزي)",
"fieldPublished": "منشور",
"commentsTitle": "إدارة التعليقات",
"noComments": "لا توجد تعليقات",
@@ -1241,8 +1241,13 @@
"instagramLabel": "إنستغرام",
"websiteLabel": "الموقع",
"days": {
"sat": "السبت", "sun": "الأحد", "mon": "الاثنين",
"tue": "الثلاثاء", "wed": "الأربعاء", "thu": "الخميس", "fri": "الجمعة"
"sat": "السبت",
"sun": "الأحد",
"mon": "الاثنين",
"tue": "الثلاثاء",
"wed": "الأربعاء",
"thu": "الخميس",
"fri": "الجمعة"
},
"coffeeAdvisor": {
"title": "مستشار المشروبات",
@@ -1253,7 +1258,10 @@
"notConfigured": "المستشار الذكي غير مفعّل لهذا المقهى بعد",
"failed": "الاقتراحات غير متاحة. حاول لاحقاً"
},
"cities": { "tehran": "طهران", "karaj": "كرج" },
"cities": {
"tehran": "طهران",
"karaj": "كرج"
},
"sort": {
"rating": "الأعلى تقييماً",
"reviews": "الأكثر مراجعات",
@@ -1296,8 +1304,13 @@
"openTime": "يفتح الساعة",
"closeTime": "يغلق الساعة",
"days": {
"sat": "السبت", "sun": "الأحد", "mon": "الاثنين",
"tue": "الثلاثاء", "wed": "الأربعاء", "thu": "الخميس", "fri": "الجمعة"
"sat": "السبت",
"sun": "الأحد",
"mon": "الاثنين",
"tue": "الثلاثاء",
"wed": "الأربعاء",
"thu": "الخميس",
"fri": "الجمعة"
},
"save": "حفظ",
"saved": "تم الحفظ",
+6 -3
View File
@@ -1056,8 +1056,8 @@
"fieldExcerptEn": "Excerpt (English)",
"fieldCategoryFa": "Category (Persian)",
"fieldCategoryEn": "Category (English)",
"fieldContentFa": "Content (Persian, Markdown)",
"fieldContentEn": "Content (English, Markdown)",
"fieldContentFa": "Content (Persian)",
"fieldContentEn": "Content (English)",
"fieldPublished": "Published",
"commentsTitle": "Comment management",
"noComments": "No comments found",
@@ -1219,7 +1219,10 @@
"notFound": "Café not found",
"exploreMore": "Explore more cafés",
"reviewCount": "{count} reviews",
"cities": { "tehran": "Tehran", "karaj": "Karaj" },
"cities": {
"tehran": "Tehran",
"karaj": "Karaj"
},
"sort": {
"rating": "Top rated",
"reviews": "Most reviews",
+2 -2
View File
@@ -1056,8 +1056,8 @@
"fieldExcerptEn": "خلاصه انگلیسی",
"fieldCategoryFa": "دسته‌بندی فارسی",
"fieldCategoryEn": "دسته‌بندی انگلیسی",
"fieldContentFa": "محتوا فارسی (Markdown)",
"fieldContentEn": "محتوا انگلیسی (Markdown)",
"fieldContentFa": "محتوا (فارسی)",
"fieldContentEn": "محتوا (انگلیسی)",
"fieldPublished": "وضعیت انتشار",
"commentsTitle": "مدیریت نظرات",
"noComments": "نظری یافت نشد",