Giter Club home page Giter Club logo

Comments (7)

paulproteus avatar paulproteus commented on June 27, 2024

The user who reported this to support@ found that their text was trapped in a much skinnier width than mine is, so the title of the bug report may seem like exaggeration, but I believe it accurately expresses the intent of the person who originally reported it to support@.

from etherpad-lite.

kentonv avatar kentonv commented on June 27, 2024

This appears to be happening here:

https://github.com/kentonv/etherpad-lite/blob/sandstorm/src/static/js/contentcollector.js#L718

This forces a wrap at 2000 characters. You can actually go back and delete the newline to get the line longer than 2000 chars again, but as soon as you edit the line, it breaks again.

Possibly our friend on support@ ended up with multiple breaks because he went back and added more text earlier in the paragraph, causing the end of the paragraph to be repeatedly chopped off.

2000 chars seems like a weirdly low limit for a paragraph. But Etherpad was originally meant to be a code editor, I think. Perhaps this limit goes all the way back to AppJet days. It does appear to go back to the first days of etherpad-lite.

It's weird that none of us have run into this problem before.

Probably, we can increase the limit, though the comments around it suggest that making it infinite would be problematic. What would be a good number?

from etherpad-lite.

paulproteus avatar paulproteus commented on June 27, 2024

4096000 seems like a good number. What are the trade-offs involved?

from etherpad-lite.

paulproteus avatar paulproteus commented on June 27, 2024

I went and read the source. Thank you for the link, btw!

https://developer.mozilla.org/en-US/docs/Web/API/Document/designMode doesn't show me much about design mode's performance trade-offs. I think little is documented about the performance trade-offs.

I think my friend @RoanKattouw might have more input on this, since he used to work on the Wikimedia Foundation's VisualEditor. Roan, how bad would it be if we have a 4096K-byte line in designMode? :)

from etherpad-lite.

kentonv avatar kentonv commented on June 27, 2024

What if I were to tag @dgreensp and ask him since it looks like this code may be so old that he may have written it? :D

David, do you remember why Etherpad limits lines to 2000 characters? Is this limit likely obsolete these days?

from etherpad-lite.

dgreensp avatar dgreensp commented on June 27, 2024

I wrote this code. :)

The limit was originally put there with unwrapped documents in mind. The relevant case is:

  1. User pastes in some giant text, with no line endings
  2. Document is not in wrap mode, so the text appears on one line that extends very far to the right-- hundreds of thousands of pixels
  3. Firefox used to crap out when coordinates exceeded 32k pixels, because it positioned platform-native widgets in 16-bit coordinates. It also seemed unlikely that the user really wanted such a ginormous line.

A low limit shouldn't be necessary from a technical standpoint.

from etherpad-lite.

kentonv avatar kentonv commented on June 27, 2024

Hooray! Since Etherpad on Sandstorm almost always operates in wrapped mode I suppose we should simply remove this limit.

from etherpad-lite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.