#1427: Autodetect clipboard contents on Paste
-------------------------+--------------------------------------------------
Reporter: alfonsoml | Owner:
Type: New Feature | Status: new
Priority: Normal | Milestone: CKEditor 3.x
Component: General | Version:
Keywords: Discussion |
-------------------------+--------------------------------------------------
Comment(by alfonsoml):
Recently I worked on this idea, and using a "dumb" diff between the
original and the after-paste contents doesn't work.
As the content is in design mode, it must work with dom nodes, I mean: the
original source might start as {{{<img src="pic1.jpg">}}} and the new
content is {{{<img src="blue.jpg">}}} then the algorithm must say that the
difference isn't just "pic1" vs "blue", all the <img> must be replaced (as
it will be added with .insertHTML)
This can become very complex, so I throw away the simple idea, then I
checked that it's possible to "empty" the document before pasting and then
you get exactly the clipboards contents. The drawback is the flashing on
the screen.
So I also ended up using a div and it seems to work (just for Firefox 3),
it isn't a very complex code, it just needs to be tuned up for each
browser.
--
Ticket URL: <http://dev.fckeditor.net/ticket/1427#comment:5>
FCKeditor <http://www.fckeditor.net/>
The text editor for Internet
------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
_______________________________________________
FCKeditor-Trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fckeditor-trac