Ticket #370 (assigned Bug)

Opened 20 months ago

Last modified 9 months ago

Interchanging content loses format when source and target are not both Opera

Reported by: saul11 Owned by: hallvord@…
Priority: Normal Milestone: Opera Compatibility
Component: General Version: FCKeditor 2.4.2
Keywords: Cc:

Description

Interchanging content (copy/paste) only takes over formatting when source and target FCKeditor are both in Opera. Tested with Firefox, IE, OpenOffice and Opera: All content could be interechanged between each other, except for Opera. Content copied from FCKeditor in Opera will only keep its formatting when pasted into FCKeditor in Opera.

Change History

  Changed 19 months ago by fredck

  • keywords interchange content copy paste format Opera removed
  • summary changed from Interchanging content loses format when source and target not both are Opera to Interchanging content loses format when source and target are not both Opera

  Changed 18 months ago by hallvord@…

  • owner set to hallvord@…
  • status changed from new to assigned

This is a missing Opera feature. I am not sure if we can resolve this for 9.5 due to the large number of cases that must be handled if, say, the text/html content on the clipboard is invalid markup, but we know about the issue.

  Changed 18 months ago by fredck

One important expected feature on online editors is the possibility to paste text coming from Word. This feature is at the top of the list, mainly for corporation intranets and web sites. All editors implement this, with different levels of quality.

I'm posting this just to make Opera aware of the severity of this limitation. People will be really angry with us! But I also understand that not everything can be fixed on time.

We are ok to declare Opera compatibility even if this ticket remains opened for now.

follow-up: ↓ 6   Changed 10 months ago by hallvord@…

This is going to be my personal pet bug. I want mum to be able to type articles in OpenOffice and paste them into Wordpress with Opera without loosing formatting, dammit! ;) Still likely to take time though. :(

  Changed 10 months ago by hallvord@…

(and the Opera bug is bug 160624, though at the moment it covers both copying formatted text from Opera to other applications and vice versa.)

in reply to: ↑ 4   Changed 10 months ago by fredck

Replying to hallvord@opera.com:

This is going to be my personal pet bug. I want mum to be able to type articles in OpenOffice and paste them into Wordpress with Opera without loosing formatting, dammit! ;) Still likely to take time though. :(

:)

To make mum and devs happy, it would be wonderful to have a way to catch the pasting operation, retrieve the "to be pasted" data, clean it up as need and then inject it in the editor.

Well I think I'm asking too much. Pasting will always be a weakness on browser based editing until some vendor step up to really solve all related problems and limits (Opera call!).

follow-up: ↓ 8   Changed 10 months ago by hallvord@…

it would be wonderful to have a way to catch the pasting operation, retrieve the "to be pasted" data, clean it up as need and then inject it in the editor

I know IE has an onpaste event that I know nothing about, but I assume we'll implement it when we implement support for rich content pasting. (Checked MSDN. Their model seems a bit confusing..) I guess something like

onpaste = function(event){ doSomething(event.data); event.preventDefault(); }

would suit the use case?

in reply to: ↑ 7   Changed 10 months ago by fredck

Replying to hallvord@opera.com:

The IE implementation is quite similar, but more powerful (with a strong limitation). It is done by using the event.dataTransfer object. This object is used by both Clipboard and DnD operations.

The strong limitation with IE, is that it is not possible to retrieve the data (with getData()) in HTML format. Only plain text or URL is possible. It is important to have HTML format accessible too. Other than that, the latest IE7 security features are a little bit buggy, showing security warning messages several times, even if the user tells it to "Don't warn me again!".

I've just checked the HTML5 specifications for it. It is a copy of the IE model, with some additions. Still imperfect though.

I would love to work with you, or someone you would appoint, on specifications in this sense, and possibly enhance the HTML5 specs with our findings. Again, Clipboard and DnD, together with Undo/Redo, are the critically weak points in the current editing support "in all browsers".

Please contact me by e-mail if there is any interest on it.

  Changed 9 months ago by hallvord@…

http://www.whatwg.org/specs/web-apps/current-work/#copy-and By the current state of the spec we're talking something like

 document.addEventListener( 'drop', 
    function(event){ 
        doSomething( event.dataTransfer.getData('text/html') ); 
        event.preventDefault(); },
    false );

In other words, the spec plans not to distinguish between drop events and paste events.

How does this look to you?

Note: See TracTickets for help on using tickets.