Opened 14 years ago

Closed 13 years ago

Last modified 12 years ago

#4876 closed New Feature (wontfix)

Better support for pasting text with tabs

Reported by: Wiktor Walc Owned by:
Priority: Normal Milestone:
Component: Core : Pasting Version: 3.0
Keywords: Cc:

Description

Problem: when pasting text with a tab, tab is changed into one space in IE (or space surrounded by <span> in Safari).

Sometimes users are using tabs to indent text. After creating text in notepad (for example), they copy that text into the editor... and notice the problem that text is not anymore indented as they expected it to be (tab is not shown as 4 spaces or something like that).

Instead of changing tabs automatically into one space, we could change them into configurable number of spaces (in a similar way like it is possible to set editor.config.tabSpaces).

Steps to reproduce

  • create the following text in notepad:
    Test<tab>Test
    Test<space><space><space><space>Test
    
    (where <tab> is simply a tab)
  • copy and paste it in the editor
  • result in IE8:
    <p>
    	Test&nbsp;Test<br />
    	Test&nbsp;&nbsp;&nbsp; Test</p>
    
    result in Safari 4.0.4:
    <p>
    	Test<span class="Apple-tab-span" style="white-space:pre"> </span>Test</p>
    <p>
    	Test &nbsp; &nbsp;Test</p>
    

Change History (3)

comment:1 Changed 13 years ago by Garry Yao

Resolution: wontfix
Status: confirmedclosed

We will not be able to provide such a fix as those browsers steal tab character already before we can check it.

comment:2 Changed 12 years ago by Jakub Ś

This issue was duplicated in #8500.

comment:3 Changed 12 years ago by Jakub Ś

#8609 was marked as duplicate.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy