Some proposed ideas about text editing improvements

• Mar 2, 2019 - 10:59

I am student who is preparing for the implementation ideas of project "text editing improvements". I have proposed these ideas below that necessary for a text editor that can comfortably editing paragraphs.
The ideas are:
• Word wrapping
• Text justification
• Line spacing controls
• Bullets
• Tab support while editing paragraph
• Some minor improvements:
"Ctrl + backspace" should delete a whole "word" at a time
The frame margin displays vaguely when editing text in a frame
Automatic capitalization when editing paragraph

Word wrapping and justification's related discussion are listed below:
https://musescore.org/en/node/14557
https://musescore.org/en/node/12614
https://musescore.org/en/node/277198
https://musescore.org/en/node/277217
https://musescore.org/en/node/280585
Line spacing comes from discussion with mentor.
"Ctrl+Backspace" idea comes from discussion on telegram:
...Another thing I found just now looking at how staff text works, is that Ctrl + backspace doesn't delete a whole word at a time. Highly annoying for me. If you do this project, could you please also look to implement this?
The rest ideas (Bullets, tab support, margin, capitalization) comes from my using experience and comparion with other word processors that do paragraph editing job well.


Comments

Automatic capitalization when editing paragraph

That's going to be a major project unless you intend to limit it to automatic capitalization of the first word in a sentence, then there will still be challenges when the language used doesn't have capitalization like Japanese or Hebrew.

In reply to by mike320

I did underestimate the effort this feature requires...And intend to implement English sentense auto capitalization only in this project. About other languages, I think some analysis of encoding and just doing auto capatilization to English sentense could help.

FWIW, I can't imagine anyone being so bothered by the need to hit Shift to capitalize the first word of a sentence that it could possibly be worth the effort to implement such a feature (and the controls needed to turn it off, which many of us would immediately want to do).

Everything else makes sense to me. Bullets probably the least important on the list, before that I'd think about things like basic indent controls

As it says in the project description, MuseScore is not a word processor, nor should it attempt to replicate all features of one. Adding more features increases the burden of maintaining backwards compatibility in the file format and consistent rendering between platforms.

All of your suggested features can be faked using existing formatting tools:

  • word wrapping can be done manually by adding line breaks
  • justification can be done by adding spaces and changing their font size
  • line spacing can be done by adding extra lines changing their font size
  • bullets or numbering can be added manually (e.g. with the unicode bullet character "•")
  • tab indentation can be done with spaces

See the inside covers of scores in the OpenScore collection for examples of these workarounds in action.

I suggest you restrict yourself to looking at features where the workaround involves a particularly large amount of effort, such as word wrapping and justification. These are the ones that are a major pain to do manually, especially if you want to change the text or layout later on as it requires going through and adding new line breaks and redoing all the space adjustments again.

I would add one more thing that isn't on your list: clickable URLs.

By the way, many of these text editing features are available in Qt. You should compile and run the Text Editor example application included with Qt (you can find it from the Welcome screen in Qt Creator - see Qt Examples).

I believe that MuseScore used to make use of Qt's text editing facilities but this was disabled at some point to reduce complexity, so now only basic text formatting is available. Perhaps somebody who knows more about this can comment.

Another update, this time the list is:
Word wrap
Text justification
Clickable URLs
Tabstop settings
About tabstop, I'd like to add more comment. Indeed I agree that editors can use several space input to do this instead of one tab, however if you look previous posts, you can find there are some requests about tabstop, though not as frequent as wrapping function. About the number of indentation, an option could be provided so that user can define his prefered tab spacing by himself. As for backward compatibility, if tab input is interpreted as a set amount of space input, then there's no problem because previous version also treat text frame's content as a set of QStrings, which can still handle spaces properly.

In reply to by ylink

Spaces don't work too well for this, because how many you need and whether the next coliumn then aligns properly depends on the (accumulated) varying width of the characters before those spaces. Been there often enough, it not really possible to write 2 or more columns of text with aliging them via spaces, or at least looks ugly. So yes, I'm for real Tabs

In reply to by Jojo-Schmitz

For text columns specifically, I would prefer to see these handled properly by adding support for multiple columns within a text frame. It is already possible to do this by adding a horizontal frame inside a vertical frame, but the interface could do with a bit of work.

In reply to by ylink

Can I please ask for Ctrl + Backspace and Ctrl + Delete to be included as well. I just looked and saw that Ctrl + left and right arrows is working in 3.x. If I remember correctly, that didn't work in 2.x. That means maybe you can use the new code for that as a template for the Backspace and Delete code.

If it is going to be a problem, I would understand. Other people can always add it on after your project. Just focus on putting together an attainable goal for your project which you can do well in the time allowed.

I have decided to stick to these features for my proposal:
Text wrapping
Justification
Clickable URLs
"Ctrl+Backspace" and "Ctrl+Delete" hotkey support
And I have done the necessary investigation for implementation of those features, currently working on the actual proposal of these ideas.

Do you still have an unanswered question? Please log in first to post your question.