OZONE Asylum
Forums
DHTML/Javascript
Pasting from clipboard after cleaning
This page's ID:
27684
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
Hi all, for some reason i'm having trouble with this one.... I need to paste the clipboard the data to an area (which is already setup and working). I am happy to use execCommand etc as its for IE only (if there is a solution without execcommand, even better). document.execcommand('paste') works fine and pastes what I copy, however I want to parse the data before it is pasted, removing certain html formatting. The problem is I cant find a way to get the clipboard data and do just that, if i use clipboardData.getData("Text") it has no formatting at all (which is not what i want), if i use clipboardData.getData("Url"), and try put in in a variable or something, it always returns null, even though document.execcommand('paste', false, clipboardData.getData("Url")) works fine. Anyone have some advice? Thanks.
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »