question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[FEATURE] multiline input

See original GitHub issue

Description

In order to be able to type content across multiple lines, you must add \begin{multiline} ... \end{multiline} (#190). I think it would be better if there were an option to specify if you want to enable the multiline environment natively. In Katex, just adding \\ without any environment, specifies a newline.

Actual behavior

The problem is that if you go to mathlive.io and paste \begin{multiline} \end{multiline}, you must press the left arrow in order to move the cursor in the right position. This could be solved by using mf.perform(['insert', '\\begin{multiline} #0 \\end{multiline}']); but again, if the user clicks at the right blank side of the mathfield, they would focus outside the multiline environment. image

Expected Behavior

I think that allowing both multiline and regular input side to side, is of no use, so it would make sense if only one mode was allowed, for the whole mathfield, without the need for the user to manually add \begin{multiline} ... \end{multiline}.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:10
  • Comments:16 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
arnogcommented, Sep 19, 2022

Pasting \begin{multiline} ... \end{multiline} into a mathlive input doesn’t work right now on the website or the latest npm version, FWIW.

The name of the environment is multline not multiline. It’s the LaTeX spelling 🤷 and it’s working right now.

2reactions
elisaadocommented, Jan 27, 2022

This is how I’ve seen it in other editors (like microsoft Word): each time you go to a new line (by pressing the return key), a new math container is created for that line, so in this case it would be

<math-field>f(x)=...</math-field>
<br>
<math-field>g(x)=...</math-field>

(well don’t use br but some css to make each math-field span a new line)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Multiple lines of input in <input type="text" /> - Stack Overflow
I am trying to get it to take multiple lines of input. The width and height make the box to be bigger, but...
Read more >
Multiline text input fields | Blockly - Google Developers
A multiline text input field stores a string as its value and a string as its text. Its value is always a valid...
Read more >
How to Make a PowerApps Multiline Text Input Control ...
This is a straightforward overview of how to make a PowerApps multiline text input control automatically adjust its height.
Read more >
Multi Line Textbox field - Contentstack
The Multi Line Textbox field enables users to enter multi-line arbitrary text as content. Note: This field does not provide any formatting options....
Read more >
Behave - Multiline Text - Tutorialspoint
A text is accessible to the implementation Python code with the .text attribute within the context variable (passed in the step function). Feature...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found