-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Text stopped wrapping text with .txt files #1407
Comments
Same problem here with Nextcloud 20.0.8 and text 3.1.0. I did not realize it until one of our users asked for an option to anable word wrap today. Could you please provide a fix for this, or at least say something to the proposed "fix" by @lunar-debian . Is is "save" to use it os is there any other parts of the editor that are affected in an unwanted way by this? |
This has been "fixed" in Nextcloud 23, i.e. lines are wrapped by default when viewing plain text files. Depending on the file, sometimes I want lines to wrap and sometimes not. It'd be nice if there was a button in the toolbar to toggle this behavior. |
I find the opposite extreme case - we see it show the file in the center third of the window (and it wraps the lines of text) and there are huge areas of empty white space on the left/right of that. I'd like to TURN OFF line wrapping or have it use the entire available width of the window before wrapping... |
@jancborchardt @nimishavijay @max-nextcloud What do you think about this. I see that with either wrapping or not wrapping will not work for everyone or every file type / content. Having a toggle is quite common for a text editor, but I fear we start overcomplicating the UI. |
I tried this CSS snippet via the "Custom CSS" app, and it seems to work fairly well to stop the line wrapping when we view text files: #editor-wrapper:not(.richEditor) .ProseMirror pre { |
Since this is just for plaintext and code editing we do not have the menubar. So the ui is not so cluttered anyway. I'd be okay with adding a toggle or so. Maybe even one for full width of the editor and one for line wrapping. |
Great idea! Agreed, word wrap toggle is there in every other editor so we should include it for sure for |
Thanks for the input everyone, I've updated the issue description accordingly. |
Okay... so this issue is getting somewhat mixed up. Initially it was about wrapping not working anymore in NC20. This is fixed with Nextcloud 23 and there is a workaround available for earlier versions. |
@max-nextcloud Yes, good take, lets track the enhancement separately then in #2290 |
@juliushaertl I copied over your new summary and reverted this so the two are easier to destinguish / understand. |
I also added a heavy handed ".editor__content { max-width:revert!important; }" to the custom css. I may refine it further if i find it causing problems elsewhere. |
Summary
Describe the bug
Nextcloud Text can be used to open
.txt
files. But word-wrapping is not enabled in Nextcloud 20 and that makes it not very usable.I've just upgraded the server from Nextcloud 18. It used to work fine.
To Reproduce
Create a new file ending in
.txt
. Open it with Text. Type a line too long to fit on the screen. It will not be wrapped and requires horizontal scrolling.Expected behavior
Words should be wrapped, just like they are with rich text.
The issue can be fixed by adding the following CSS snippet using the custom CSS app.
Screenshots
Server details
Text app version: 3.1.0
Nextcloud version: 20.0.6 - 20.0.6.1
The text was updated successfully, but these errors were encountered: