Skip to content

Invert behaviour of enter key inside fenced code block #9133

@Sharparam

Description

@Sharparam

Description

When writing a fenced code block in markdown, it would be great if (either by default or as an option) the enter key made newlines instead of sending the message. Like how slack does it: Outside of a code block, ENTER sends a message and Shift+ENTER makes a newline; inside a code block, ENTER makes a newline and Shift+ENTER sends the message.

Steps to reproduce

  • Position cursor in message field with markdown turned on
  • Start a code block with ```
  • Press the ENTER key

Expect a newline to be input, instead message is sent.

Log: N/A

Version information

  • Platform: web

For the web app:

  • Browser: Firefox Stable v65.0.2 (64-bit)
  • OS: Windows 10 Pro (1803, 64-bit)
  • URL: riot.im/app

matrix-react-sdk version: <local>
riot-web version: 1.0.3
olm version: 3.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions