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

Styles (font, size) lost on new paragraphs #1222

Closed
DaveInMaine opened this issue Aug 25, 2018 · 2 comments
Closed

Styles (font, size) lost on new paragraphs #1222

DaveInMaine opened this issue Aug 25, 2018 · 2 comments
Labels
resolution:duplicate This issue is a duplicate of another issue and was merged into it. type:bug This issue reports a buggy (incorrect) behavior.

Comments

@DaveInMaine
Copy link

🐞 Bug report

Inline styles (font, size, bold, marker colors, etc) get lost at the end of paragraphs. Pressing Enter in the middle when not positioned at beginning or end preserves the styles in both parts of the "split" paragraph, which is good. If you are at the end of the paragraph (which will be the usual case if typing a new document, everything gets reset to the default when you press Enter. Based on the behavior of popular word processors, the inline styles should be copied to new paragraphs.

I'm using a version built from the framework installed a couple weeks ago. Not sure if there is a global version number or not. In any case all builds seem to behave the same, so version shouldn't matter.

📋 Steps to reproduce

  1. Type a few words of text on an empty page
  2. Select all, and set custom font, size, marker colors, or any similar inline styles
  3. Move to end of content, and type a few more words. All will show with the newly set styles as expected.
  4. Then press Enter to start a new paragraph.
  5. The styles are all reset to default now.

✅ Expected result
The inline styles should be preserved on the new paragraph, as is the standard behavior of MS Word, Google Docs, and other popular document editors. I believe this is the behavior that most people will expect and desire.

❎ Actual result
The styles are all reset to default upon pressing Enter. Not a big deal for Bold/Italic, since those rarely need to span multiple paragraphs, but very annoying if you need to keep re-selecting the desired font, size and/or color.

📃 Other details that might be useful

The same thing happens if you delete the last letter in a paragraph (so it becomes empty), and then type some more. In a blank page, type "Hi", then select it, set font & size. Then move to end, press backspace twice, and type "Hello" - your font and size are reset to default again.

@Reinmar
Copy link
Member

Reinmar commented Aug 30, 2018

Hi! Thanks for a very detailed ticket.

The problem with enter is described here: https://github.com/ckeditor/ckeditor5-enter/issues/40

The backspace behaves like this on purpose. If you think that backspace should work differently please report a new ticket in https://github.com/ckeditor/ckeditor5-typing/issues.

@Reinmar Reinmar closed this as completed Aug 30, 2018
@Reinmar Reinmar added type:bug This issue reports a buggy (incorrect) behavior. resolution:duplicate This issue is a duplicate of another issue and was merged into it. labels Aug 30, 2018
@Reinmar
Copy link
Member

Reinmar commented Aug 30, 2018

PS. 👍 the linked ticket so we can prioritise it. I reported it a long time ago and to my surprise we got just a single DUP of it reported and no other activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution:duplicate This issue is a duplicate of another issue and was merged into it. type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

No branches or pull requests

2 participants