Skip to content

jcubic/filter-paste-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

jQuery plugin for intercepting paste text into iframe with design mode

this plugin allow you to filter text pasted into iframe (tested on latest Firefox and Chrome and Internet 8) it will not work in Opera

usage:

$(function() {
	$('iframe').designMode(true).filterPaste(function(text) {
		return text.replace(/<\/?\w+[^>]*>/gi, "");
	});
});

this will strip all tags from pasting text (like when you copy from a web page)

Aditional plugins

  1. document
  2. body
  3. designMode
  4. selection
  5. range

License

This is free software. You may distribute it under the terms of the

Poetic License. http://genaud.net/2005/10/poetic-license/

Copyright (c) 2012 Jakub Jankiewicz

About

intercept content pasting into iframe with design mode

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published