mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-12 10:10:29 +03:00
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
This commit is contained in:
parent
72bb5b42af
commit
b24f858369
15 changed files with 425 additions and 160 deletions
|
|
@ -59,6 +59,9 @@ export const Reply = as<'div', ReplyProps>(
|
|||
};
|
||||
}, [replyEvent, mx, room, eventId]);
|
||||
|
||||
const badEncryption = replyEvent?.getContent().msgtype === 'm.bad.encrypted';
|
||||
const bodyJSX = body ? trimReplyFromBody(body) : fallbackBody;
|
||||
|
||||
return (
|
||||
<Box
|
||||
className={classNames(css.Reply, className)}
|
||||
|
|
@ -82,11 +85,7 @@ export const Reply = as<'div', ReplyProps>(
|
|||
<Box grow="Yes" className={css.ReplyContent}>
|
||||
{replyEvent !== undefined ? (
|
||||
<Text className={css.ReplyContentText} size="T300" truncate>
|
||||
{replyEvent?.getContent().msgtype === 'm.bad.encrypted' ? (
|
||||
<MessageBadEncryptedContent />
|
||||
) : (
|
||||
(body && trimReplyFromBody(body)) ?? fallbackBody
|
||||
)}
|
||||
{badEncryption ? <MessageBadEncryptedContent /> : bodyJSX}
|
||||
</Text>
|
||||
) : (
|
||||
<LinePlaceholder
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue