Skip to content
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

Paragraph style lost when hitting <enter> on line start #7

Open
bujatt opened this issue Dec 21, 2015 · 3 comments
Open

Paragraph style lost when hitting <enter> on line start #7

bujatt opened this issue Dec 21, 2015 · 3 comments
Labels

Comments

@bujatt
Copy link

bujatt commented Dec 21, 2015

  1. I am at the editor.
  2. I add some lines.
  3. I set one line to Style "Heading 1"
  4. I move the caret to beginning of this styled line
  5. I hit ENTER
  6. The styling looks to be lost. What actually happens: the "Heading 1" styled line is empty, and the content of the styled line is moved one line to bottom and styled as "body text".

Expected behaviour:
Move the "Heading 1" style line one line to bottom, and insert an empty line styled as "body text".

@JohnMcLear
Copy link
Member

Just noticed it removed styling on line before, yea that's an issue.. Minor but could do w/ being resolved..

@JohnMcLear JohnMcLear added the bug label May 18, 2020
@edsaperia
Copy link

@JohnMcLear advises: "I'd guess that the contentcollector.js is where the behaviour is. The concept of "line attributes" is not a first class citizen in the web so it's possible we have a bastardization with a missing expectation that they can be moved from line X to Y. Also ensuring that line X has then removed (if expected behaviour). [see also] https://github.com/ether/ep_test_line_attrib"

@edsaperia
Copy link

@webzwo0i says "the ep_headings problem might not be in contentcollector, but https://github.com/ether/etherpad-lite/blob/develop/src/static/js/ace2_inner.js#L2679
the bug also exists for ep_align and I can imagine for all lines with line attributes, that are not lists. basically the * (invisible line marker) is left on the old line, so any attributes that are set on the line marker (and thus on the whole line) won't be applied to the new line. fun: when you do backspace key on the beginning of the new line (without attributes), everything is at its place again. when you do delete on the old line, the * is removed. but this only happens for ep_headings2, with ep_align it works with backspace and delete."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants