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

Tab spaces are ignored while copy pasting the content from Notepad or Notepad++ editor #12806

Closed
fazil3295 opened this issue Nov 7, 2022 · 1 comment · Fixed by #12955
Closed
Assignees
Labels
intro Good first ticket. squad:platform Issue to be handled by the Platform team. support:2 An issue reported by a commercially licensed client. type:bug This issue reports a buggy (incorrect) behavior.

Comments

@fazil3295
Copy link

📝 Provide detailed reproduction steps (if any)

  1. Open the Notepad or Notepad ++ editor and Type the below content using tab key to insert tab spaces before the text "Two" & "Three"
    One
    Two
    Three

  2. Copy the above content and paste it into ckeditor 5 demo link https://ckeditor.com/ckeditor-5/demo/#classic

✔️ Expected result

Tab spaces should be retained as same as ckeditor 4 behavior.
image

❌ Actual result

Tab spaces are ignored in ckeditor 5.
image

@fazil3295 fazil3295 added the type:bug This issue reports a buggy (incorrect) behavior. label Nov 7, 2022
@fazil3295
Copy link
Author

Further , we are hitting the breakpoint(while passing the above text) at plainTextToHtml function defined in https://github.com/ckeditor/ckeditor5/blob/3dda63e55a51bc37abc752427fc7e864b5cd97b9/packages/ckeditor5-clipboard/_src/utils/plaintexttohtml.js

Clipboard data:
t.clipboardData.getData('text/plain')
'One\r\n\tTwo\r\n\t\tThree'

Here I can see the tab spaces(\t) are not preserved.

@pomek pomek added intro Good first ticket. squad:platform Issue to be handled by the Platform team. labels Nov 7, 2022
@martynawierzbicka martynawierzbicka added the support:2 An issue reported by a commercially licensed client. label Nov 7, 2022
@CKEditorBot CKEditorBot added the status:planned Set automatically when an issue lands in the "Sprint backlog" column. We will be working on it soon. label Nov 20, 2022
@martnpaneq martnpaneq self-assigned this Nov 28, 2022
@CKEditorBot CKEditorBot added status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. and removed status:planned Set automatically when an issue lands in the "Sprint backlog" column. We will be working on it soon. labels Nov 28, 2022
psmyrek added a commit that referenced this issue Dec 2, 2022
Fix (clipboard): Replace tab with four spaces when pasting data from clipboard. Closes #12806.
@CKEditorBot CKEditorBot removed the status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. label Dec 2, 2022
@CKEditorBot CKEditorBot added this to the iteration 59 milestone Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
intro Good first ticket. squad:platform Issue to be handled by the Platform team. support:2 An issue reported by a commercially licensed client. type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants