From b24f858369578a496a20fe47c89762f2711403cd Mon Sep 17 00:00:00 2001
From: Ajay Bura <32841439+ajbura@users.noreply.github.com>
Date: Fri, 27 Oct 2023 21:27:22 +1100
Subject: [PATCH] Improve Editor related bugs and add multiline md (#1507)
* remove shift from editor hotkeys
* fix inline markdown not working
* add block md parser - WIP
* emojify and linkify text without react-parser
* no need to sanitize text when emojify
* parse block markdown in editor output - WIP
* add inline parser option in block md parser
* improve codeblock regex
* ignore html tag when parsing inline md in block md
* add list markdown rule in block parser
* re-generate block markdown on edit
* change copy from inline markdown to markdown
* fix trim reply from body regex
* fix jumbo emoji in reply message
* fix broken list regex in block markdown
* enable markdown by defualt
---
src/app/components/editor/Toolbar.tsx | 19 +-
src/app/components/editor/input.ts | 151 +++++++---
src/app/components/editor/keyboard.ts | 12 +-
src/app/components/editor/output.ts | 41 ++-
src/app/components/message/Reply.tsx | 9 +-
src/app/organisms/room/RoomInput.tsx | 3 +-
src/app/organisms/room/RoomTimeline.tsx | 3 +-
.../organisms/room/message/MessageEditor.tsx | 3 +-
src/app/organisms/room/message/styles.css.ts | 2 +-
src/app/organisms/settings/Settings.jsx | 4 +-
src/app/plugins/react-custom-html-parser.tsx | 46 +--
src/app/state/settings.ts | 2 +-
src/app/utils/markdown.ts | 277 ++++++++++++++----
src/app/utils/room.ts | 2 +-
src/app/utils/sanitize.ts | 11 +-
15 files changed, 425 insertions(+), 160 deletions(-)
diff --git a/src/app/components/editor/Toolbar.tsx b/src/app/components/editor/Toolbar.tsx
index 6feae00..5d5e989 100644
--- a/src/app/components/editor/Toolbar.tsx
+++ b/src/app/components/editor/Toolbar.tsx
@@ -148,7 +148,7 @@ export function HeadingBlockButton() {