-
-
Notifications
You must be signed in to change notification settings - Fork 833
Add option to disable markdown #5356
Add option to disable markdown #5356
Conversation
Signed-off-by: Resynth <resynth1943@tutanota.com>
… add-option-to-disable-markdown
Signed-off-by: Resynth <resynth1943@tutanota.com>
@@ -74,7 +75,9 @@ export function createMessageContent(model, permalinkCreator, replyToEvent) { | |||
msgtype: isEmote ? "m.emote" : "m.text", | |||
body: body, | |||
}; | |||
const formattedBody = htmlSerializeIfNeeded(model, {forceHTML: !!replyToEvent}); | |||
const formattedBody = SettingsStore.getValue("enableMarkdown") && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm relatively sure moving this to createMessageContent
would break Markdown-formatted messages by others, hence its inception(s) in the composer components.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doubtful given messages are not markdown over the wire, the sender converts them into HTML and the other ends just renders it.
I'm really not sure what to do about the I18N errors. I'll leave those files alone until I get advice from an Element developer. |
Signed-off-by: Resynth <resynth1943@tutanota.com>
Signed-off-by: Resynth <resynth1943@tutanota.com>
Signed-off-by: Resynth <resynth1943@tutanota.com>
Signed-off-by: Resynth <resynth1943@tutanota.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code generally seems sane - thanks for the contribution!
You could also fix element-hq/element-web#3728 at the same time by making the option contain a link to CommonMark Like
|
@aaronraimist wait, I didn't do that? I swear, I was just gonna do that here. Must've slipped my mind, sorry. |
@resynth1943 thanks for the contribution! 2 q's:
|
@resynth1943 bumping this last comment, please let us know updates on those points or else this PR will likely be triaged/closed soon. |
Hey, But, based on the code, it seems that Markdown will be enabled by default, as per: https://github.com/matrix-org/matrix-react-sdk/pull/5356/files/a5e4a03fa8b2133effcc70211f3f8c83c1a1d701#diff-b4f775f8ca52f8aa92695986fffd693ec8428bf69e27576721ad0d5b62a4c637R294 As for screenshots, these are the ones I can find: |
I believe @resynth1943 is no longer actively contributing, so let's close this for now. Someone else could pick this up in a new PR if they'd like to. |
Related to #16304 (comment) |
@nadonomy @jryans Why can't this PR simply be approved and tested?... and if anything needs to be changed/fixed, someone can look into that. This is probably the ONLY reason I'm considering moving away from Element/Matrix, as I keep having inconveniences of markdown messing up all my spacing between paragraphs, or transforming "+" into bullets, and all that crap I don't need. I've been ANXIOUS to get this feature merged to Matrix... Closing a PR just because the owner didn't provide a screenshot. |
@nunoperalta, the PR was closed because the author doesn't seem to be active anymore. If someone wants to pick this up they can |
Still don't think it was a good reason to discard the work done for this. |
The work hasn't been discarded, anyone can go and pick this up. The team just has other priorities |
And it needs further iterations, for one an |
Fixes element-hq/element-meta#1189
Open to UI changes. This is a baseline; it works rather well, but we need tests.
Signed-off-by: Resynth resynth1943@tutanota.com