Edit option (#1447)
authorAjay Bura <32841439+ajbura@users.noreply.github.com>
Sat, 14 Oct 2023 05:08:43 +0000 (16:08 +1100)
committerGitHub <noreply@github.com>
Sat, 14 Oct 2023 05:08:43 +0000 (10:38 +0530)
commitf5bcc9b851dc7799c56449d4bd90bbe7c68733a7
tree68c6a32607e31385b614524d32778fa7b3df86d6
parent152576e85d46dd9d47296dc2e61491fe24bc735e
Edit option (#1447)

* add func to parse html to editor input

* add  plain to html input function

* re-construct markdown

* fix missing return

* fix falsy condition

* fix reading href instead of src of emoji

* add message editor - WIP

* fix plain to editor input func

* add save edit message functionality

* show edited event source code

* focus message input on after editing message

* use del tag for strike-through instead of s

* prevent autocomplete from re-opening after esc

* scroll out of view msg editor in view

* handle up arrow edit

* handle scroll to message editor without effect

* revert prev commit: effect run after editor render

* ignore relation event from editable

* allow data-md tag for del and em in sanitize html

* prevent edit without changes

* ignore previous reply when replying to msg

* fix up arrow edit not working sometime
18 files changed:
package-lock.json
package.json
src/app/components/editor/Editor.tsx
src/app/components/editor/common.ts
src/app/components/editor/index.ts
src/app/components/editor/input.ts [new file with mode: 0644]
src/app/components/editor/output.ts
src/app/components/editor/slate.d.ts
src/app/organisms/room/RoomInput.tsx
src/app/organisms/room/RoomTimeline.tsx
src/app/organisms/room/message/Message.tsx
src/app/organisms/room/message/MessageEditor.tsx [new file with mode: 0644]
src/app/organisms/room/message/Reactions.tsx
src/app/utils/dom.ts
src/app/utils/markdown.ts
src/app/utils/matrix.ts
src/app/utils/room.ts
src/app/utils/sanitize.ts