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

Copy & Paste #3

Open
RyanRiffle opened this issue Nov 20, 2014 · 10 comments
Open

Copy & Paste #3

RyanRiffle opened this issue Nov 20, 2014 · 10 comments

Comments

@RyanRiffle
Copy link
Owner

Provide copy and paste support. At a minimum be able to copy and paste text only without formatting.

@RyanRiffle
Copy link
Owner Author

It will most likely be a while before this is added. I know it is a core feature but it involves a lot. I would rather get more done, that way when copy and paste implementation comes around, it can be thought through better.

@MrSchism
Copy link
Contributor

MrSchism commented Jan 6, 2015

Might be worth looking into the HTML5 Clipboard API. It doesn't work as well as it could, but it works in most instances on current browsers. It's better than nothing (until we get better support or resort to ZeroClipboard).

Reference: http://www.w3.org/TR/clipboard-apis/

@RyanRiffle
Copy link
Owner Author

@MrSchism In order for copy paste to be implemented, first text selection really needs to be handled by Poe itself, because when tables and images get added, stock js ranges will not be too great to work with.

@RyanRiffle RyanRiffle added this to the 0.1 - Alpha milestone Jan 7, 2015
@andersevenrud
Copy link

I have looked into this in the past regarding OS.js. Since clipboard is considered unsafe, most browsers does not allow this behavior... except IE (shocker... right?). There are Flash solutions for this, but even that is slowly becoming unsusable because of new security policies regarding Flash.

https://github.com/mojombo/clippy

@andersevenrud
Copy link

But you can however create custom keyboard bindings and functions for this pretty easily (but that would only work within Poe). Global copy/paste via OS clipboard however is not that pretty.

@RyanRiffle
Copy link
Owner Author

@andersevenrud Yea copy and pasting is horrible when it comes to web browsers. Its been an issue for years, I wonder why the vendors have not done something about it?

@andersevenrud
Copy link

@RyanRiffle It's quite simple. It's considered harmful. If you had complete access to the clipboard you could insert malicious links and/or code (if the implementation has a buffer overflow or something, things go wrong fast!).

@MrSchism
Copy link
Contributor

Yeah. Luckily they're working on improving HTML5 APIs to replace the Flash solutions... but there's still no real solution.

@RyanRiffle
Copy link
Owner Author

Copy and paste will not be hard to implement now. Text selection now works due to the recent rewrite of the project and change from Coffeescript to Javascript. So now it is just a matter of getting the elements that are selected and detaching them from the DOM and inserting them when necessary. Getting all of the selected words is already in the API as well so piece of cake!

@RyanRiffle
Copy link
Owner Author

As a note: The desktop version of Poe will possibly be able to support Copy + Paste using the system clipboard, however the web version will need something more as stated above. At the time of this writing Copy has been implemented but the inverse Paste has not been worked out completely. This is only for internal copy + paste at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants