Editor for event type description (#7450)

* add editor for event type description

* enable same things for markdownIt

* show links in blue

* fix placeholder design

* format description for event list

* limit event descript ot 4 lines in list

* shorten event-type description whenever needed

* add editor to create event type dialog

* fix link title in event type list

* Fix overwriting users column when saving event types (#7445)

* Only overwrite user column when present

* Clean up

* Merge branch 'main' into feat/editor-event-type-description

* Merge branch 'main' into feat/editor-event-type-description

# Conflicts:
#	apps/web/pages/settings/my-account/profile.tsx

* Linting

---------

Co-authored-by: CarinaWolli <[email protected]>
Co-authored-by: Joe Au-Yeung <[email protected]>
Co-authored-by: zomars <[email protected]>
This commit is contained in:
authored and GitHub committed 2023-03-02 12:55:25 -07:00
1 parent e12b21a73c
commit cfb625e934
10 files changed
+56 -39

No files matched your search

@@ -1,13 +1,7 @@
import type { PrismaClient, EventType } from "@prisma/client";
import MarkdownIt from "markdown-it";
const md = new MarkdownIt("zero").enable([
//
"emphasis",
"list",
"newline",
"strikethrough",
]);
const md = new MarkdownIt("default", { html: true, breaks: true, linkify: true });
function parseAndSanitize(description: string) {
const parsedMarkdown = md.render(description);