numbas / editor

An editor for the Numbas e-learning system.
http://numbas.mathcentre.ac.uk
Apache License 2.0
59 stars 62 forks source link

Newlines should create paragraph breaks when pasting text into a content area #331

Closed christianp closed 5 years ago

christianp commented 8 years ago

From Bernhard von Stengel:

this is a feature, not a bug, on the "rich text editor box" (Another bug that I cannot reproduce is that sometimes that box has no vertical space to enter text and only shows the options; easily remedied by making the box full screen. I will try to note it once it happens.)

The following confused me on my Linux system and is more a bug than a feature, but should be documented (it may be a bit obscure, but I am happy to type that up, in a documentation section on how to use the rich text editor which I have not located yet; perhaps for the not-yet-existing "question authoring cheat sheet"):

I tend to type longer text involving LaTeX in my local editor (vim) first because the Numbas editor can be slightly slow, and also because I am used to this editor.

Now, when I cut and paste (on my X display, with highlight and middle mouse button, but also CTRL-C CTRL-V from gedit, for example), line breaks are copied as
which (I had to try this out) correspond to a SHIFT-RETURN key on the keyboard, whereas the RETURN key creates a new paragraph. The newlines look like paragraph breaks, but are not which shows e.g. when you center a paragraph. In order to get paragraph breaks, you need to copy a blank line from the ASCII text.

I wonder if this is Linux-specific (where new lines are indeed a single linefeed ASCII character LF), whereas DOS has CR-LF linebreaks. I do not have Windows to test this.

christianp commented 5 years ago

Not going to do this. Feels like a lot of work for something that might feel quite flaky.